My rails server started hanging today, so I tried running different apps to see if the issue was caused by my app, even created an empty app and with that even the default page doesn't come up.
I've been using it as just an http server, testing front-end with adding files into the public folder, so, I don't even compile any actual ruby code, just plain HTML, CSS and JS.
When I try to browse localhost:3000, the page is unresponsive, I can't even view source and I'd like to add that this happens with Chrome, Safari, IE and Edge, so I don't think it's a caching issue on the browser front.
I tried running the server on a specific ip and port, also tried the 0.0.0.0 trick mentioned on some other questions, doesn't help me so far.
I'm using ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15] and Rails 4.2.5.
Any ideas?
Well, I ended up resolving the issue by uninstalling and reinstalling the whole stack. Couldn't find the reason behind the issue but if you get stuck with the same problem, apparently a complete reinstall fixes it...
Related
I have combed through lots of references to this issue (most recently followed tips on this post, but nothing helped.
Here's the issue: I already have a Rails app that works-or used to work on localhost:3000. But then, suddenly I get blank screens with the same app. The app works with no problem in rails console. The default Rails screen shows up too. The more I read abut blank screens, the more I am lost.
So the sequence of events--all potentially could be complicating factors:
I run the Rails via CLI.
I also have MAMP installed to work with a WordPress site locally.
At one point, either before MAMP or after MAMP, I installed Brew. (All were done following online instructions.)
Not long ago, I tested out a simple Rails app on Heroku, which at first worked, but then the app no longer could be updated. After much tinkering, I removed rbenv and the problem went away (ie my Rails app could be updated on Heroku again).
All of these issues seem to be related. But are they? How do I find out?
Rails 5.2.1
Ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
What do you mean by suddenly went blank? Look for before/after steps you took. Also, check the Rails logs to see what's wrong. This might also be useful: https://stackoverflow.com/a/39476142/888278
I'm work on Linux and I develop a Ruby on Rails application.
I've set up the puma-dev seeing this page and they say, if you are working on Linux, please setup dev-tld-resolver.
I have completed both setups and I want to test if they work correctly.
I linked puma-dev to my Rails app and run it in the foreground with the -sysbind option. It runs, but if I type the URL (myapp.dev), it does not work.
How can I solve this problem?
I solved the problem myself.
The problem was Firefox. Firefox not support .dev domain so it couldn't connect to my application.
As I turn my app with Google Chrome, it executed correctly.
What I want to do works on my OSX dev machines and on a staging server. However, I encounter problems on the production server.
I have a Rails Engine which I have created, maintained, and used over the years: https://github.com/allesklar/tkh_admin_panel
It works fine on many apps and I have been porting it to this new website as of late. For admin views, my controllers render the 'admin' layout which is located on this engine.
Everything has gone great until I tried to deploy to the site's production server. I get the following error:
ActionView::Template::Error (no implicit conversion of nil into String):
This exception occurs in the line with the following code:
render layout: 'admin'
I can't pinpoint any differences in gems, rbenv ruby versions, or any other factor from one setup to the next.
I've tried to reset the binstubs and done a number of other things.
No matter what I do, it works on the staging server and not on the production server.
Please point me to some directions where I can investigate further.
UPDATE ---
The scope of the problem has changed entirely since now I'm experiencing the same issue on my development machines.
I therefore think the problem lies in the host app/gem relationship. The same version of this gem works fine with some other Rails host sites of mine.
Any ideas welcome.
Try to recompile all assets. If you can (it's a prod server) delete all assets and manifest and re-deploy.
Try to delete all cache, if you are using page or fragment caching, perhaps your deploy system is not cleaning it correctly.
Simply reboot the system (simple action that fixed a lot of problems in the past).
And if nothing works, try to display the full backtrace to see where this is happening
Since i upgrade my app on my development server, the request are terribly slow. Event if the log seems to render quite quickly, it take 10-15 second for the loading to be complete (event if the page is already fully loaded)
My configuration :
Rails 3.2.1
Ruby 1.9.3-p125 (rvm)
Standalone Passenger (3.0.11)
I do not have this kind of issue on my development machine, so i guess the problem is not coming from my application
I had a very similar problem. Found this question ( Slow assets ruby 1.9.3, macos, rails 3.2 ) which helped me discover it was chrome where the problem was occurring. Still don't know why, or how to fix it.
In my case it was Rails Panel extension that was slowing Chrome. I just disabled it and it the app became 3 times faster.
I have a built a rails app in which I am using the ckeditor 3.5.1 together with the ckeditor gem.
When running in development, everything works fine. But when I run in production, I get errors.Sometimes, the text_area with the ckeditor does not show up. But when I clear my cache and cookies, everything works fine. Then after a while, the error comes up again. The error comes up more often than not.
Closer investigation reveals that when the error occurs, some files like staging.domain.com/javascripts/ckeditor/config.js are instead being requested from staging.domain.com/posts/config.js which is naturally non-existent
(posts is from my Post model)
How can the cache/cookies affect which path the files are served from?
Does anyone know what else might be wrong and how I can fix it?
P.S. I am using Phusion passenger in production.
It would seem the problem was being cased by mod_pagespeed which was activated. By disabling it, everything came back to normal.
I am curious though, about how this was happening.