OK, I have been chasing after this for hrs and that i cannot decipher it out. I've got a Ruby on Rails application that I have used to my hosting provider DreamHost. I have produced a brand new atmosphere known as "stage" and produced a stage.rb file within the /config/atmosphere folder and set the next line into my atmosphere.rb
# Make sure to restart your server whenever you modify this file # Identifies jewel version of Rails to make use of when vendor/rails isn't present RAILS_Jewel_VERSION = '2.3.5' unless of course defined? RAILS_Jewel_VERSION ENV["RAILS_ENV"] = "stage" # Bootstrap the Rails atmosphere, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do config
I can run
and everything runs fine. I'm able to run rake db:migrate and generate my database. I'm able to then drop in to the console and do something about my model. I'm also able to begin to see the ActiveRecord activity in stage.log
The issue is after i open a browser and visit the URL I recieve the 500 error of
We are sorry, but something went wrong.
After I attempt to access the website via a browser I do not see anything written to stage.log.
My apache log file appears like this.
126.96.36.199 - - [19/Jan/2010:06:05:01 -0800] "GET /classes/calendar HTTP/1.1" 500 861 "-" "Mozilla/5. (Macs U Apple Mac OS X 10_5_8 en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4..4 Safari/531.21.10"
I have even attempted running the applying remotes in the console which works too. I simply can't understand why the page will not serve correctly from the browser.
It is possible to permission setting that I am missing. I believe on DreamHost the FTP user and also the user the server runs under are identical and so i think I've the right permissions but I am simply not sure.
Any help could be appreciated, Take advantage of
The issue is likely inside your line setting RAILS_ENV to "stage". The = assignment you're using sets something only when RAILS_ENV is not defined. Within this situation, RAILS_ENV has probably recently been set to 'production' by DH before striking your application, therefore the = assignment doesn't have effect.
To determine whether this is actually the problem, have a look at the logs directory - you'll most likely look for a production.log with no records in stage.log (aside from those developing out of your running script/console) as your application has been (inadvertently) run as production.
One of the ways for this would be to alter the line to merely:
ENV["RAILS_ENV"] = "stage"
Usually this issue could be permissions about the scripts, or your jewel enviroment. I am unfamiliar with deployment of rails applications on DH, have you been using Passenger or fastcgi?
In the spend, look at your jewel atmosphere by running
RubyGems Atmosphere: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-linux] - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - Jewel Pathways: - /usr/lib/ruby/gems/1.8 - /home/<username>/.jewel/ruby/1.8 - Jewel CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com", "http://gemcutter.org"] - REMOTE SOURCES: - http://gems.rubyforge.org/ - http://gems.github.com - http://gemcutter.org
These configurations apply in the console, although not when running via apache. For your, you have to edit config/conditions.rb and add
ENV['GEM_PATH'] = '/home/<usrname>/.jewel/ruby/1.8:/usr/lib/ruby/gems/1.8'
You need to make certain that which you set because the Jewel_PATH here matches what's output in the jewel env command.