rails不会切换到生产环境

时间:2014-09-11 15:23:01

标签: ruby-on-rails .htaccess passenger production bluehost

我在Bluehost上托管了一个在开发环境中工作的站点。我一直在努力让它在生产中工作,这是另一个问题。我正在尝试切换回生产模式。我换了.htaccess

...
RailsEnv = production
...

我跑了

touch tmp/restart.txt

我甚至尝试过

rake db:migrate RAILS_ENV=production

但它仍处于发展阶段!!

rake about 
About your application's environment
Ruby version              1.9.3 (x86_64-linux)
RubyGems version          1.8.23
Rack version              1.5
Rails version             4.0.0
JavaScript Runtime        therubyracer (V8)
Active Record version     4.0.0
Action Pack version       4.0.0
Action Mailer version     4.0.0
Active Support version    4.0.0
Middleware                ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x000000045894c8>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETag
Application root          /home3/*****/rails_apps/my_site
Environment               development
Database adapter          mysql2
Database schema version   20140910132221

log / production.log文件大小没有变化。

配置/ environments.rb

ENV['GEM_PATH'] = '/home3/<username>/ruby/gems:/usr/lib/ruby/gems/1.9.3'
# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
MySite::Application.initialize!

在config / environments / production.rb

config.force_ssl = false

如果我将其设置为true,则网站根本不会出现

0 个答案:

没有答案