开发者

How do I change the rails environment an app I just deployed to production?

开发者 https://www.devze.com 2023-03-30 19:26 出处:网络
I just deployed a dummy rails 3.1.0.rc6 app to a rackspace server. Two things First when i ssh in the run

I just deployed a dummy rails 3.1.0.rc6 app to a rackspace server. Two things

First when i ssh in the run

rails c
Sprockets::Environment#static_root is deprecated
Loading development environment (Rails 3.1.0.rc6)
irb(main):001:0> Rails.env
=> "development"

Does this mean its in development environment and if so h开发者_如何学Goow do i change to production and second in the log folder i have

ls log
development.log  passenger.3000.log  production.log

but they are all blank for some reason

here is my url and it appears that something is wrong but no logs indicate the problem

<VirtualHost 50.57.119.54:80>
      ServerAdmin test@tes.com
      ServerName active.posnation.net
      # ServerAlias
      DocumentRoot /var/www/active.posnation.net/public
      ErrorLog /var/www/active.posnation.net/logs/error.log

      RailsEnv production
        <Directory "/var/www/active.posnation.net/public">
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>


When you run rails c, it will default to development mode. This does not mean your actual live app is running in development mode. If you're using Passenger, it will default to run your app in production mode unless you tell it otherwise.

To get the console to run in development mode, call rails c development instead.

As far as the log files are concerned, have you checked the permissions on the files to make sure Passenger can write to them (and to make sure you can then read them)?

0

精彩评论

暂无评论...
验证码 换一张
取 消