Why do I suddenly get a blank screen with Rails on localhost? - ruby-on-rails

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

Related

How to fix the warning: "DEPRECATION: action_cable.js has been renamed to actioncable.js – please update your reference before Rails 8"? (Rails 7.0.4)

I have a Ruby on Rails single page application using React as the front-end, and since we upgraded from Rails 6.1 to Rails 7.0, the warning "DEPRECATION: action_cable.js has been renamed to actioncable.js – please update your reference before Rails 8" appears on the browser console in almost every page of the application, except for static views (without forms or such) such as e-mails and the home page.Warning on the browser console
I've tried reviewing my Gemfile to make sure they are up-to-date, ran bundle update hoping that the problem was caused by an outdated gem, but the warning is still there. I've checked the project folder, and there is no "action_cable.js" or "actioncable.js" file, nor are there any references to those files/paths in any part of the code.
Does anybody have an idea on how to fix this warning? I couldn't find any information on how to do it, or other people that are having the same issue.
This is my first time posting here, so if there's any information missing, I'll be more than happy to share it!

Rails server hanging even with even freshly created app

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...

rails 3.2.1 very slow in development mode

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.

Problem to run Sphinx on Ruby on Rails 2.3.2

Yesterday I was trying to install Sphinx for full-text search on Windows 7. So, I followed their website's installation steps.
Once I installed its windows service, I ran the indexer and then the test search against my app database and it worked great.
Then, I wanted to make it work on Ruby on Rails 2.3.2, so I downloaded and installed the thinking-sphinx plugin. I followed these steps, creating the sphinx.conf file at the config directory of my app, and then I ran the rake thinking-sphinx:indexer and it worked great. After that, when I wanted to start it, as it's explained in that guide, it didn't start...it just keep saying "thinking-sphinx:start", and it didn't either stop or start.
What am I doing wrong?
Thanks,
Brian
Well, it seems that without starting it using rake it works anyway...it's maybe because the Sphinx service is already started, so you don't need to start it also with the rake from ruby.
I've got another doubt now...I'm from Argentina and we use accents to write in some words...for example "acción", which means "action" in english. I tried searching that word without the accent(people don't ussually write accents on searches) and it didn't bring any results, but if I search it with the accent, it will bring results.
How can I fix that?
Thanks,
Brian

Rails 5.1.7 Server Hangs On First Request

We are trying to update a Rails Server to release 5.1.
Server starts fine; but on the first request, goes completely dead; and has to be killed with signal 9.
Doesn't matter if its Puma or Webrick.
Doesn't matter if its 5.1.0 or 5.1.7
Doesn't matter if its development or production mode.
Eventually I saw the process size was 90GB and growing!
I've tried rbtrace, but struggled to get anything meaningful out of it.
I'm on osx, so strace isn't available, and I've struggled to get dtrace or dtruss to work, or produce anything meaningful.
So looking for a way to get this rails server to tell me what it's problem is....
Let me know what additional information is salient.
After quite a long process, I found a solution that didn't so much find the source of the issue, but provided a process to work around it.
First off, I used
rails app:update
And accepted all of the overwrites. Then using git, I walked through all of the removed code from my config file and returned just the required sections [like config/routes.rb, and ActionMailer config, for example].
Application then started right up, no issue.
This also led me to
http://railsdiff.org/5.0.7.2/5.1.0
Which is pretty critical for Rails upgrading. This is well worth consuming:
https://github.com/rails/rails/issues/31377#issuecomment-350422347

Resources