繁体   English   中英

部署Rails应用程序期间heroku的工头启动错误

[英]error in foreman start for heroku during deploying rails application

我尝试着从Rails 3.2.6和Heroku开始。 我的Ruby版本是1.9.3,我的database.yml是这样的:

development:
  adapter: postgresql
  encoding: utf8
  reconnect: false
  database: iscubeonror_development
  pool: 5
  username: rails
  password: rails
  host: localhost

test:
  adapter: postgresql
  encoding: utf8
  reconnect: false
  database: iscubeonror_test
  pool: 5
  username: root
  password:
  host: localhost

production:
  adapter: postgresql
  encoding: utf8
  reconnect: false
  database: iscubeonror_production
  pool: 5
  username: root
  password:
  host: localhost

我的procfile是

web: bundle exec rails server thin -p $PORT -e $RACK_ENV

我在production.rb,development.rb和test.rb上有以下内容:

 config.active_support.deprecation = :notify
 config.active_support.deprecation = :stderr
 config.active_support.deprecation = :stderr

最后,我正在使用Windows,我的Gemfile是

gem 'rails', '3.2.6'
gem 'pg'
gem 'thin'
gem "foreman"

当在终端heroku日志上写它给我warnig为

2012-11-20T18:05:32+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-20T18:05:32+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-20T18:05:35+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-11-20T18:05:35+00:00 app[web.1]: => Booting Thin
2012-11-20T18:05:35+00:00 app[web.1]: => Rails 3.2.6 application starting in pro
duction on http://0.0.0.0:52284
2012-11-20T18:05:35+00:00 app[web.1]: => Call with -d to detach

当写在终端工头开始时,它给了我

D:\Kalpesh\web\iscubeonror> foreman start
19:37:27 web.1  | started with pid 3868
19:38:18 web.1  | You did not specify how you would like Rails to report depreca
tion notices for your $RACK_ENV environment, please set config.active_support.de
precation to :log, :notify or :stderr at config/environments/$RACK_ENV.rb

由于这个原因,我的瘦服务器没有启动,我该怎么办
虽然我按照https://devcenter.heroku.com/articles/rails3#deploy-your-application-to-heroku plz的所有步骤进行操作,请紧急回复我

您应该阅读:

You did not specify how you would like Rails to report depreca
tion notices for your $RACK_ENV environment, please set config.active_support.de
precation to :log, :notify or :stderr at config/environments/$RACK_ENV.rb

我认为您需要在.env中定义一些环境变量:

RACK_ENV=development
PORT=3000

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM