localhost server not responding for middleman development environment - middleman

I am running Mountain Lion, none RVM managed.
I have attempted:
middleman server -p 4567 -e development
middleman server
and
bundle exec middleman server
I've tried various combinations with templates, removed the install and started over several times.
Everything seems to run just find and middleman is standing watch, etc. I then navigate to http://localhost:4567/ (when applicable) and the browser always says that it cannot connect to the server "localhost"
the problem persists across two environments with dropbox sinking the source files between the two. Maybe I'm doing something wrong but I can't figure out any other steps from the docs and I've tried to connect to the official user forum but repeated "resends" of the confirmation e-mail don't work for two different accounts. Yah, it's been one of those development days...
Thanks for any help!

Ok, for some reason localhost is getting grabbed up on my computer. switching to 0.0.0.0:4500 solves it.

Related

wkhtmltopdf hangs on 10% and does not generate PDF

I'm using WKHtmlToPdf to generate some docs here at work, in internal applications, for over one and half year without any problem. Some applications are coded in C++, some in AutoIt3, and today, after restarting all the computers due to external reasons (power generator would be tested), wkhtmltopdf stopped working on all machines at my company.
I can't even run it from command line. Whether I try to convert a webpage or a local HTML file, it always hangs on 10%. All our machines are Windows 8 32 bits and runs their own install (the applications aren't running under a network share).
I tried downloading wkhtmltopdf again from the website, installing it, etc, but nothing worked. I also tried adding --disable-javascript option, which also didn't work. Cleaning %TEMP% folder did not help too.
I never faced anything like this. All the machines were restarted normally, going to start menu, etc. And it does not look like a network issue, since I'm accessing internet to write this, and we are a small company, we use a standard Wi-Fi router, just like your house. Nothing was changed, no file deleted, no Windows update, no network settings... just a restart. I saw some guys facing the same problem when trying to run wkhtmltopdf from PHP, but in this case, I have this problem even by running it from DOS, as anyone would do.
wkhtmltoimage is working fine. Just wkhtmltopdf stopped working.
Screenshot
In my case, wkhtmltopdf was hanging on files locally stored after the progress counter had made an initial jump to the percentage corresponding to 1 page. It turned out that I had an http_proxy variable set to some unaccessible proxy server. Clearing this environment variable solved the issue.

Remote web server pages do not update after making changes via SSHFS

I've been troubleshooting this for a while now and can't seem to find a solution. I have a remote LAMP server in my office and sometimes need to work from home. I use a SSHFS between my home computer and work to accomplish this.
However, I have run into an issue where when I update the local files, the changes get pushed to the server immediately as they should. I have verified that the changes are there via SSH and VIM. However, if I refresh and even force refresh the page in Chrome the changes do not appear.
I also created a local file which showed up immediately on the server and I could view in Chrome, but any subsequent changes to the file are not rendered.
Any time that I'm in the office the changes are rendered immediately as well.
Anybody have any ideas?
Apache 2.4.7
Sublime Text 3 Editor
Client SSHFS: win-sshfs 0.0.1.5
Server SSH: OpenSSH_6.6.1p1
My guess is that the modified time isn't updated correctly on the remote filesystem. I'm not so sure what would be the fix for this but this at least could be a first trail to follow?
In fact, I just did a little search around and found this bug : https://code.google.com/p/win-sshfs/issues/detail?id=99
With a possible workaround in Sublime 2, I'll let you check if there is such a setting in Sublime 3

Apache Crash Dialog

I'm running XAMPP on my windows machine and experiencing a problem with Apache crashing a couple times a day. When it does, a dialog pops up and I have to manually tell windows to end the program. After I do that, XAMPP automatically starts it back up in a couple of seconds with no issues. When it crashes while I'm not home though, the server is down until I get back. So I have two questions:
Are periodic crashes something that should be expected, or is this indicative of another issue I should be trying to pinpoint?
If this is something I should just learn to deal with, is there a way to automatically restart httpd.exe when these issues occur, so I don't experience down time when I'm away from home?
You'd look into log files, especially the Apache access and error logs, to see what happened, when you are not at home. I've met some similar situation: I have a problematic PHP script hosted on my server, when someone visits the page, it leads to an Apache crash.
I'd suggest you do the investigation as follows:
Search the timestamp of recent Apache restart.
Check the Apache access log to see whether there are some scripts have been accessed.
Manually access these scripts in your browser (to see if Apache will crash again)
You'd better check the PHP error log as well.
If there is really nothing suspicious, you can try WAMP bundle alternatively, which is also a very popular PHP development environment and it is stable.
Although there aren't many cases in which one should "expect" periodic crashes, in this case you are better of reconsidering your setup. From the frontpage of the XAMPP site:
XAMPP is the most popular PHP development environment
Sure, you can use it as "production" server, but XAMPP isn't build for hosting websites, it is intended as development server, so you don't have to manually setup Apache, PHP and MySQL on you dev machine. If you actually want to run your website for the public, setup Apache/IIS, MySQL and PHP manually, those products on there own are made for running in production. Or you can consider getting some cheap shared hosting somewhere, so you don't need to setup anything.

Passing a rails app from development server to production server

I'm running my rails app on my laptop.
Now that things are up and running, I want to pass it all to a online server. How can I copy the app to the server, set it to Production mod and make everything work?
I have seen a lot of replies to pass an app from development to production mode on the same server but not to a different machine...
Can you point me to some online tutorial for tis? I haven't found any...
Thanks
A couple of things that you need to keep in mind whenever deploying to a production server:
I prefer to bundle my gems into the vendor directory bundle --deployment
Also, be sure to compile your assets rake assets:precompile.
You need to pick a web server (apache/nginx/etc) and and application server (phusion passenger).
You should check out http://railscasts.com/episodes/335-deploying-to-a-vps which covers some details on how you can deploy your website to a production machine. Also check out some of these videos http://railscasts.com/?tag_id=21.

Issue in hosting a webapplication in a local machine

I have developed a webapplication in my local machine. the application is hosted on tomcat 7.0.22 server. the application is accessed using http://localhost:8080/app
When i use this in my localmachine, I am not facing any problems. But when I intend to share the link with my fellow team mates using the links http://myipaddress:8080/app, I am getting Javascript errors. I placed the js files in the build path of the application.
Even i have noticed the tables width are changed in the same browser
I am unable to find the problem. Can any one help
Thanks,
Vamsi
When testing on your own machine, use your own IP instead of "localhost" and should be able to compare apples with apples and avoid confusing cause and effect.
I would say to check the configuration of your host or vhost files, but if all included JS files are on the same host, that is unlikely to be the problem.
My guess is that you hard coded a path somewhere or that the problem is related to some other difference between testing from your machine and their machine (different browser, versions, plugins, etc) and not actually related at all to the domain. Could possibly also be a file permission problem (but that is a wild guess).