I have successfully deployed Ruby on Rails app on Heroku. But when I visit the URL given by Heroku, error says: "The page you were looking for doesn't exist."
URL - https://cryptic-waters-2558.herokuapp.com/
Please help.
Your application is up and running, since the error message comes from Webrick. Probable cause of this error is lack of some initial data (maybe you forgot to run heroku run rake db:seed), which causes ActiveRecord::RecordNotFound error. You can check this easily with heroku logs or heroku logs -t, which works similar to tail -f.
Related
I have used Rails 4
I am using gem 'god' for restarting sidekiq if server crashes.
But after deploying through capistrano getting error.
The server is not available (or you do not have permissions to access it)
I have tried with different commands.
bundle exec god start
god status
god load 'path_to_config_god'
All commands showing the same error.
How can I get it run?
Please give some advice.
Thanks
This is currently demonstrated on my playground app, visiting it results in a 500, works now having deployed the fix given in the answer.
The error is was:
Processing by GcController#show as HTML
Completed 500 Internal Server Error in 0ms
NoMethodError (undefined method `stat' for GC:Module):
app/controllers/gc_controller.rb:4:in `show'
Conversely if you grab the Rails app from Github.
Then RAILS_ENV=production rails server and go to /.
You'll get:
{:count=>131, :heap_used=>193, :heap_length=>345, :heap_increment=>152, :heap_live_num=>127915, :heap_free_num=>29930, :heap_final_num=>0}
Is it safe to assume Heroku is using a patched GC?
Has anyone else encountered this? There doesn't appear to be any documentation about it.
I'm seeing some conflicting memory usage behaviour locally vs on Heroku, which is why I'm trying to GC.stat. I wonder if the differences could be accounted for by patched GC.
I also opened a Heroku issue for this.
Answer graciously stolen from JD at Heroku:
Cedar uses 1.9.2-p290 by default. I'm not sure if GC.stat is in 1.9.2
offhand, but it appears to not be on Heroku for sure. We don't patch
the Ruby versions we run.
I can confirm that if you specify ruby '1.9.3' in your Gemfile, GC.stat will work fine.
I am using rails in windows, I pushed my app to heroku for the 1st time and after that each time I try run rails s on my local environment I get an error related to Could not find Rubygem railties. The push to heroku also seems to have failed as each time I try hit the app's url I get a "We are sorry but something went wrong page". Does anyone have an idea what could be the cause for this and what is the solution?
I am running Apache2 with Passenger and Rails. I am able to run my web app with 'rails s -e production' but Passenger will not run the app. It just gives the 500 error. The log is giving me the whole precompile error, but changing the config to precompile or 'rake assets:precompile:all' do nothing. I am working with an existing SQL database and it sometimes also gives a table not found error when running behind Apache, but works just fine in WEBRick. I have a "RailsEnv production" directive which did nothing either. I do not understand why it would not work with Passenger but with WEBRick, especially when I got it working with Apache before, then simply redeployed the app in a different directory and got these issues. There is also a cache: get miss error but I resolved it I believe, but my app still does not work. I have been working on it all day yesterday and today and still can not get the app to run with Apache. Already tried permissions, already tried reinstall, already tried db:migrate, already tried everything. Does anyone know why it is failing?
This is my first stab at Ruby on Rails. Just deployed a very simple app to Heroku.
The thing is that my app runs flawlessly on mongrel development; When I run it with "mongrel_rails start -e production" however, I get the error "We're sorry, but something went wrong."
For the life of me, I couldn't debug this. Heroku logs is not returning anything, the Exceptional addon in Heroku is not returning anything, and I cannot find mongrel.log on my Windows machine (when I run mongrel using: mongrel_rails start -e production -d"
I'm using Rails 2.3.5 and sqlite3 with bundler to pack my gems.
I was told that probably rails is not booting up correctly. I can't find any other way to diagnose this. Any ideas?
Thanks,
ANaimi
Take a look at your log/production.log file. That should contain detailed information about what's going on. It will usually contain a line that specifies the name of a gem that needs to be installed.
Heroku doesn't use mongrel, so I'm assuming that's what you're trying to do to figure out why it isn't working when you push it to heroku.
I've found, in most cases, my heroku problems have been because of uninstalled gems. Make sure you create a gem manifest.
Try tailing logs while booting up. From the terminal in the log directory do: tail -f *.log and then launch the app from another terminal (likely it's development.log since you're probably running in development mode.)
Not sure if this got definitively answered, however, check your '%app_root%/config/environments/' folder, and compare 'development.rb' to 'production.rb'.
Make sure that you have all necessary settings in the production.rb file - might have missed something important there.