Hey guys, I have a Rails deployment issue. If I run the ‘rails
app_name’ command on my server directly, then run that, then the app
runs fine. But, if I run ‘rails app_name’ on my desktop and then
upload the app to the server, then I get a ‘xxx failed to start
properly.’ error. How do I fix this?
What error do you get?
This could be because of different version of Rails on local and remote
machines? check config/enviroment.rb for rails version the app has been
created with,
I have following for a rails application created on my machine,
RAILS_GEM_VERSION = ‘1.2.3’
-Jatinder
Jatinder S. wrote:
What error do you get?
This could be because of different version of Rails on local and remote
machines? check config/enviroment.rb for rails version the app has been
created with,
I have following for a rails application created on my machine,
RAILS_GEM_VERSION = ‘1.2.3’-Jatinder
#---------------------------------------------
I have the exact same problem and have yet to get to the bottom of this.
I looked to see which Rails version was on both the server and my local
machine using the shell command rails -v will output this. They are both
using Rails 1.2.3 . I don’t know where to look for the bug as all the
log files found in RAILS_ROOT/log are blank. Here is what I have learned
about this issue. The Application Error message found in the “Welcome
aboard page” and for every method in the controller originates from the
RAILS_ROOT/public/.htaccess file. It is triggered by a 500 error from
the looks of it. I have heard some people say it is a permissions
problem with RAILS_ROOT/tmp/sessions so I set chmod 755 /tmp and chmod
755/tmp/sessions and it still is giving me this error. I am thinking
this may be my ftp application changing some permissions to files upon
upload. I would love to hear anyones thoughts on this issue. I made a
very simple app to test how hard deployment was going to be before I
built an entire app. Also I can access the database via the irb by
running the following commands in the ssh shell.
irb
MODEL_NAME.find :all
returns all records found for that model. So I know that this is nothing
with the database.yml file (I thought windows line breaks may be to
blame) and the model is working fine.
Regards,
Tim M.
On 6/5/07, Tim M. [email protected] wrote:
I have the exact same problem and have yet to get to the bottom of this.
I looked to see which Rails version was on both the server and my local
machine using the shell command rails -v will output this.
-
You shouldn’t have Rails in gems on the production server. It
should go to vendor/rails of your app (look up Rake task
rails:freeze:gems). This eliminates the possibility of Rails version
mismatch. “Vendor everything” -
You can tell your app to render a development error page (with the
actual error message and stack trace), by changing this line in
environments/production.rb:
config.action_controller.consider_all_requests_local = false
to
config.action_controller.consider_all_requests_local = true
and restarting it.
–
Alex Verkhovsky
RubyWorks