Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 推送至Heroku giv错误后“;我们';很抱歉,出了点问题。”;_Ruby On Rails 3_Heroku - Fatal编程技术网

Ruby on rails 3 推送至Heroku giv错误后“;我们';很抱歉,出了点问题。”;

Ruby on rails 3 推送至Heroku giv错误后“;我们';很抱歉,出了点问题。”;,ruby-on-rails-3,heroku,Ruby On Rails 3,Heroku,我在rails 3.2.1上运行。我在部署的应用程序上收到以下消息:很抱歉,出现了问题 我真的不知道是什么导致了这个错误 这是我的heroku日志 Invalid gemspec in [C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specificatio ns/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"] 2013-02-01T12:53:55+00

我在rails 3.2.1上运行。我在部署的应用程序上收到以下消息:很抱歉,出现了问题

我真的不知道是什么导致了这个错误

这是我的heroku日志

Invalid gemspec in [C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specificatio
ns/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
2013-02-01T12:53:55+00:00 app[web.1]: [2013-02-01 12:53:55] INFO  WEBrick::HTTPS
erver#start: pid=2 port=47478
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3328337976595330500__cal
l__2238187366165653971__callbacks'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/methodoverride.rb:21:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/runtime.rb:17:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/lock.rb:15:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/content_length.rb:14:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2013-02-01T12:53:58+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/handler/webrick.rb:59:in `service'
2013-02-01T12:53:58+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-02-01T12:53:58+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-02-01T12:53:58+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]: cache: [GET /pages/home] miss
2013-02-01T12:53:58+00:00 heroku[router]: at=info method=GET path=/pages/home ho
st=evening-caverns-5777.herokuapp.com fwd=82.207.20.180 dyno=web.1 queue=0 wait=
0ms connect=4ms service=519ms status=500 bytes=643
2013-02-01T12:53:47+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-02-01T12:53:48+00:00 app[web.1]: [2013-02-01 12:53:48] ERROR SignalExceptio
n: SIGTERM
2013-02-01T12:53:48+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-02-01T12:53:58+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-02-01T12:54:00+00:00 heroku[web.1]: Process exited with status 137
2013-02-01T12:53:58+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-02-01T12:57:46+00:00 heroku[api]: Starting process with command `bundle exe
c rake db:reset` by marik.expert@gmail.com
2013-02-01T12:57:59+00:00 heroku[run.1710]: State changed from up to complete
2013-02-01T12:57:58+00:00 heroku[run.1710]: Client connection closed. Sending SI
GHUP to all processes
2013-02-01T12:57:52+00:00 heroku[run.1710]: Awaiting client
2013-02-01T12:57:52+00:00 heroku[run.1710]: Starting process with command `bundl
e exec rake db:reset`
2013-02-01T12:57:59+00:00 heroku[run.1710]: Process exited with status 1
2013-02-01T12:57:53+00:00 heroku[run.1710]: State changed from starting to up
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: Started GET "/pages/home" for 82.207.20.18
0 at 2013-02-01 13:00:50 +0000
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/runtime.rb:17:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/methodoverride.rb:21:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3328337976595330500__cal
l__2238187366165653971__callbacks'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/lock.rb:15:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2013-02-01T13:00:50+00:00 heroku[router]: at=info method=GET path=/pages/home ho
st=evening-caverns-5777.herokuapp.com fwd=82.207.20.180 dyno=web.1 queue=0 wait=
0ms connect=3ms service=8ms status=500 bytes=643
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/content_length.rb:14:in `call'
2013-02-01T13:00:50+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-02-01T13:00:50+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/handler/webrick.rb:59:in `service'
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: cache: [GET /pages/home] miss

如何解决这个问题?

嗯,有一件事,没有db适配器被传递给Heroku。确保您的heroku应用程序有一个数据库,一个

您的应用程序需要一个数据库连接,但您没有指定适当的适配器。如果您正在使用Heroku Postgres,则需要添加类似于
gem'pg',:group=>:production
的内容,并确保在Heroku配置中有
数据库\u URL

您需要在Gemfile中的生产环境中添加pg gem

  group :production
    gem 'pg'
  end
然后跑

  heroku rake db:migrate   #create db tables for production

 git push heroku master    #pushed the latest changes to production

 heroku restart        # it will start the server again with new changes

它现在应该可以工作了。

您的heroku日志如何为windows提供路径?C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications/ZenTest-4.8.4.gemspec可能是您将gems与代码一起推送的吗?
  heroku rake db:migrate   #create db tables for production

 git push heroku master    #pushed the latest changes to production

 heroku restart        # it will start the server again with new changes