【问题标题】:"We're sorry, but something went wrong." Database-migration (Heroku, Git Bash)“我们很抱歉,但有些不对劲。”数据库迁移(Heroku、Git Bash)
【发布时间】:2015-06-30 13:09:30
【问题描述】:

大家好! :) 我是新来的,所以请原谅我犯的错误或我可能会问的愚蠢问题。我也是编程新手,所以请耐心等待 :) 我学习 Ruby on Rails,并尝试使用 Heroku 让我的应用程序在 Web 上运行。但无论我多么努力,我都无法让它正常工作。

所以问题是: 当我在网上检查我的应用时收到一条错误消息:

“很抱歉,出了点问题”

我已阅读过有关此问题的信息(在“theodinproject”网站上),它与 数据库迁移 相关 - 据我了解。

我正在使用: PostgreSQL 9.4 /// Git 1.9.5-preview20141217

不过,我不知道该怎么做。请帮帮我。

(我附上的代码不完整,但希望你能找到其中的错误。

remote:        Warning. Error encountered while saving cache /tmp/build_7fe80551
4c65f55b3e7c6ffbf5a1e179/tmp/cache/sass/074cffc5affa5c84b781ae2423063506c85d58b1
/home.css.scssc: can't dump anonymous class #<Class:0x007f71296b1a38>
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/p
lugins! Support for these plugins will be removed in Rails 4.0. Move them out an
d bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and
config/initializers/myplugin.rb. See the release notes for more on this: http:/
/weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from
<top (required)> at /tmp/build_7fe805514c65f55b3e7c6ffbf5a1e179/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/p
lugins! Support for these plugins will be removed in Rails 4.0. Move them out an
d bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and
config/initializers/myplugin.rb. See the release notes for more on this: http:/
/weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from
<top (required)> at /tmp/build_7fe805514c65f55b3e7c6ffbf5a1e179/Rakefile:7)
remote:        Warning. Error encountered while saving cache /tmp/build_7fe80551
4c65f55b3e7c6ffbf5a1e179/tmp/cache/sass/074cffc5affa5c84b781ae2423063506c85d58b1
/home.css.scssc: can't dump anonymous class #<Class:0x007f3974848550>
remote:        Asset precompilation completed (10.78s)
remote:
remote: ###### WARNING:
remote:        Injecting plugin 'rails_log_stdout'
remote:
remote: ###### WARNING:
remote:        Injecting plugin 'rails3_serve_static_assets'
remote:
remote: ###### WARNING:
remote:        Add 'rails_12factor' gem to your Gemfile to skip plugin injection

remote:
remote: ###### WARNING:
remote:        You have not declared a Ruby version in your Gemfile.
remote:        To set your Ruby version add this line to your Gemfile:
remote:        ruby '2.0.0'
remote:        # See https://devcenter.heroku.com/articles/ruby-versions for mor
e information.
remote:
remote: ###### WARNING:
remote:        Removing `Gemfile.lock` because it was generated on Windows.
remote:        Bundler will do a full resolve so native gems are handled properl
y.
remote:        This may result in unexpected gem versions being used in your app
.
remote:        In rare occasions Bundler may not be able to resolve your depende
ncies at all.
remote:        https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: ###### WARNING:
remote:        No Procfile detected, using the default web server (webrick)
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:        Default types for Ruby  -> console, rake, web, worker
remote:
remote: -----> Compressing... done, 26.1MB
remote: -----> Launching... done, v6
remote:        https://peaceful-gorge-9214.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/peaceful-gorge-9214.git
* [new branch]      master -> master

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.1040
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
for these plugins will be removed in Rails 4.0. Move them out and bundle them i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
for these plugins will be removed in Rails 4.0. Move them out and bundle them i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:7)

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ git push heroku master
Everything up-to-date

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ git push heroku master
Everything up-to-date

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ heroku create --stack cedar
!    You've reached the limit of 5 apps for unverified accounts.
!    Delete some apps or add a credit card to verify your account.

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ git push heroku master
Everything up-to-date

Abel@ABEL-PC /c/Sites/myrubyblog (master)
$ heroku logs -t
←[36m2015-04-22T06:12:48.946759+00:00 app[web.1]:←[0m     2: <html>
←[36m2015-04-22T06:12:48.946766+00:00 app[web.1]:←[0m     7:   <%= csrf_meta_tag
s %>
←[36m2015-04-22T06:12:48.946755+00:00 app[web.1]:←[0m
←[36m2015-04-22T06:12:48.946768+00:00 app[web.1]:←[0m   app/views/layouts/applic
ation.html.erb:5:in `_app_views_layouts_application_html_erb__456807460569566140
5_70045134083880'
←[36m2015-04-22T06:12:48.946767+00:00 app[web.1]:←[0m     8: </head>
←[36m2015-04-22T06:12:48.946769+00:00 app[web.1]:←[0m
←[36m2015-04-22T06:12:48.946758+00:00 app[web.1]:←[0m ActionView::Template::Erro
r (default.css isn't precompiled):
←[36m2015-04-22T06:12:48.946763+00:00 app[web.1]:←[0m     5:   <%= stylesheet_li
nk_tag    "default", :media => "all" %>
←[36m2015-04-22T06:12:48.935846+00:00 app[web.1]:←[0m Processing by HomeControll
er#index as HTML
←[36m2015-04-22T06:12:48.944757+00:00 app[web.1]:←[0m Completed 500 Internal Ser
ver Error in 8.7ms
←[36m2015-04-22T06:12:48.946771+00:00 app[web.1]:←[0m
←[33m2015-04-22T06:12:49.528519+00:00 heroku[router]:←[0m at=info method=GET pat
h="/favicon.ico" host=peaceful-gorge-9214.herokuapp.com request_id=f203763b-250a
-41c9-b525-a0ad82f88f91 fwd="193.6.168.41" dyno=web.1 connect=0ms service=11ms s
tatus=200 bytes=323
←[36m2015-04-22T07:16:53.352805+00:00 heroku[web.1]:←[0m Idling
←[36m2015-04-22T07:16:53.354125+00:00 heroku[web.1]:←[0m State changed from up t
o down
←[36m2015-04-22T07:16:56.808445+00:00 heroku[web.1]:←[0m Stopping all processes
with SIGTERM
←[36m2015-04-22T07:16:57.603395+00:00 app[web.1]:←[0m [2015-04-22 07:16:57] FATA
L SignalException: SIGTERM
←[36m2015-04-22T07:16:57.603403+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:32:in `start'
←[36m2015-04-22T07:16:57.603400+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:170:in `select'
←[36m2015-04-22T07:16:57.603405+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:160:in `start'
←[36m2015-04-22T07:16:57.603406+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:13:in `run'
←[36m2015-04-22T07:16:57.603408+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
←[36m2015-04-22T07:16:57.603410+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands/server.rb:70:in `start'
←[36m2015-04-22T07:16:57.603412+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:55:in `block in <top (required)
>'
←[36m2015-04-22T07:16:57.603413+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:50:in `tap'
←[36m2015-04-22T07:16:57.603402+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
←[36m2015-04-22T07:16:57.603414+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:50:in `<top (required)>'
←[36m2015-04-22T07:16:57.603416+00:00 app[web.1]:←[0m   script/rails:6:in `requi
re'
←[36m2015-04-22T07:16:57.603418+00:00 app[web.1]:←[0m   script/rails:6:in `<main
>'
←[36m2015-04-22T07:16:57.603423+00:00 app[web.1]:←[0m [2015-04-22 07:16:57] INFO
  going to shutdown ...
←[36m2015-04-22T07:16:57.603447+00:00 app[web.1]:←[0m [2015-04-22 07:16:57] INFO
  WEBrick::HTTPServer#start done.
←[36m2015-04-22T07:16:57.603466+00:00 app[web.1]:←[0m Exiting
←[36m2015-04-22T07:16:58.823388+00:00 heroku[web.1]:←[0m Process exited with sta
tus 143
←[36m2015-04-22T14:22:04.595881+00:00 heroku[web.1]:←[0m Unidling
←[36m2015-04-22T14:22:04.596062+00:00 heroku[web.1]:←[0m State changed from down
to starting
←[36m2015-04-22T14:22:09.277085+00:00 heroku[web.1]:←[0m Starting process with c
ommand `bundle exec rails server -p 25616`
←[36m2015-04-22T14:22:13.426726+00:00 app[web.1]:←[0m DEPRECATION WARNING: You h
ave Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be
removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold th
em in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the
release notes for 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/environm
ent.rb:5)
←[36m2015-04-22T14:22:13.426264+00:00 app[web.1]:←[0m DEPRECATION WARNING: You h
ave Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be
removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold th
em in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the
release notes for 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/environm
ent.rb:5)
←[36m2015-04-22T14:22:14.192475+00:00 heroku[web.1]:←[0m State changed from star
ting to up
←[36m2015-04-22T14:22:14.128069+00:00 app[web.1]:←[0m [2015-04-22 14:22:14] INFO
  WEBrick::HTTPServer#start: pid=3 port=25616
←[36m2015-04-22T14:22:14.127733+00:00 app[web.1]:←[0m [2015-04-22 14:22:14] INFO
  WEBrick 1.3.1
←[36m2015-04-22T14:22:14.127750+00:00 app[web.1]:←[0m [2015-04-22 14:22:14] INFO
  ruby 2.0.0 (2015-04-13) [x86_64-linux]
←[36m2015-04-22T14:22:16.671964+00:00 app[web.1]:←[0m => Booting WEBrick
←[36m2015-04-22T14:22:16.671977+00:00 app[web.1]:←[0m Started GET "/" for 193.6.
168.230 at 2015-04-22 14:22:16 +0000
←[36m2015-04-22T14:22:16.890280+00:00 app[web.1]:←[0m Connecting to database spe
cified by DATABASE_URL
←[36m2015-04-22T14:22:16.671971+00:00 app[web.1]:←[0m => Rails 3.2.21 applicatio
n starting in production on http://0.0.0.0:25616
←[36m2015-04-22T14:22:16.671973+00:00 app[web.1]:←[0m => Call with -d to detach
←[36m2015-04-22T14:22:16.671975+00:00 app[web.1]:←[0m => Ctrl-C to shutdown serv
er
←[33m2015-04-22T14:22:17.121875+00:00 heroku[router]:←[0m at=info method=GET pat
h="/" host=peaceful-gorge-9214.herokuapp.com request_id=27cc842d-97c4-41ee-bb1b-
c5414df2c851 fwd="193.6.168.230" dyno=web.1 connect=2ms service=467ms status=500
bytes=939
←[36m2015-04-22T14:22:17.114423+00:00 app[web.1]:←[0m Completed 500 Internal Ser
ver Error in 8.5ms
←[36m2015-04-22T14:22:17.105805+00:00 app[web.1]:←[0m Processing by HomeControll
er#index as HTML
←[36m2015-04-22T14:22:17.112211+00:00 app[web.1]:←[0m   Rendered home/index.html
.erb within layouts/application (1.0ms)
←[36m2015-04-22T14:22:17.116354+00:00 app[web.1]:←[0m
←[36m2015-04-22T14:22:17.116358+00:00 app[web.1]:←[0m ActionView::Template::Erro
r (default.css isn't precompiled):
←[36m2015-04-22T14:22:17.116361+00:00 app[web.1]:←[0m     3: <head>
←[36m2015-04-22T14:22:17.116363+00:00 app[web.1]:←[0m     4:   <title>Myrubyblog
</title>
←[36m2015-04-22T14:22:17.116360+00:00 app[web.1]:←[0m     2: <html>
←[36m2015-04-22T14:22:17.116366+00:00 app[web.1]:←[0m     6:   <%= javascript_in
clude_tag "default" %>
←[36m2015-04-22T14:22:17.116364+00:00 app[web.1]:←[0m     5:   <%= stylesheet_li
nk_tag    "default", :media => "all" %>
←[36m2015-04-22T14:22:17.116367+00:00 app[web.1]:←[0m     7:   <%= csrf_meta_tag
s %>
←[36m2015-04-22T14:22:17.116371+00:00 app[web.1]:←[0m   app/views/layouts/applic
ation.html.erb:5:in `_app_views_layouts_application_html_erb__451241027198694938
9_70288888574320'
←[36m2015-04-22T14:22:17.116372+00:00 app[web.1]:←[0m
←[36m2015-04-22T14:22:17.116373+00:00 app[web.1]:←[0m
←[36m2015-04-22T14:22:17.116369+00:00 app[web.1]:←[0m     8: </head>
←[33m2015-04-22T14:25:48.363056+00:00 heroku[router]:←[0m at=info method=GET pat
h="/" host=peaceful-gorge-9214.herokuapp.com request_id=d1ad96f9-4292-4bf9-a1a3-
e5f3b0b0b8cc fwd="193.6.168.230" dyno=web.1 connect=10ms service=23ms status=500
bytes=939
←[36m2015-04-22T14:25:48.343740+00:00 app[web.1]:←[0m Processing by HomeControll
er#index as HTML
←[36m2015-04-22T14:25:48.345506+00:00 app[web.1]:←[0m Completed 500 Internal Ser
ver Error in 1.7ms
←[36m2015-04-22T14:25:48.344585+00:00 app[web.1]:←[0m   Rendered home/index.html
.erb within layouts/application (0.1ms)
←[36m2015-04-22T14:25:48.347216+00:00 app[web.1]:←[0m ActionView::Template::Erro
r (default.css isn't precompiled):
←[36m2015-04-22T14:25:48.347220+00:00 app[web.1]:←[0m     3: <head>
←[36m2015-04-22T14:25:48.347224+00:00 app[web.1]:←[0m     5:   <%= stylesheet_li
nk_tag    "default", :media => "all" %>
←[36m2015-04-22T14:25:48.347213+00:00 app[web.1]:←[0m
←[36m2015-04-22T14:25:48.340679+00:00 app[web.1]:←[0m Started GET "/" for 193.6.
168.230 at 2015-04-22 14:25:48 +0000
←[36m2015-04-22T14:25:48.347221+00:00 app[web.1]:←[0m     4:   <title>Myrubyblog
</title>
←[36m2015-04-22T14:25:48.347218+00:00 app[web.1]:←[0m     2: <html>
←[36m2015-04-22T14:25:48.347225+00:00 app[web.1]:←[0m     6:   <%= javascript_in
clude_tag "default" %>
←[36m2015-04-22T14:25:48.347227+00:00 app[web.1]:←[0m     7:   <%= csrf_meta_tag
s %>
←[36m2015-04-22T14:25:48.347228+00:00 app[web.1]:←[0m     8: </head>
←[36m2015-04-22T14:25:48.347230+00:00 app[web.1]:←[0m   app/views/layouts/applic
ation.html.erb:5:in `_app_views_layouts_application_html_erb__451241027198694938
9_70288888574320'
←[36m2015-04-22T14:25:48.347232+00:00 app[web.1]:←[0m
←[36m2015-04-22T14:25:48.347233+00:00 app[web.1]:←[0m
←[33m2015-04-22T14:25:49.604725+00:00 heroku[router]:←[0m at=info method=GET pat
h="/favicon.ico" host=peaceful-gorge-9214.herokuapp.com request_id=58ce9665-d914
-4f4b-a0d5-1330b6d13f95 fwd="193.6.168.230" dyno=web.1 connect=13ms service=124m
s status=304 bytes=153
←[36m2015-04-22T15:29:04.803632+00:00 heroku[web.1]:←[0m Idling
←[36m2015-04-22T15:29:04.804237+00:00 heroku[web.1]:←[0m State changed from up t
o down
←[36m2015-04-22T15:29:07.878185+00:00 heroku[web.1]:←[0m Stopping all processes
with SIGTERM
←[36m2015-04-22T15:29:08.617094+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:170:in `select'
←[36m2015-04-22T15:29:08.617110+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:50:in `<top (required)>'
←[36m2015-04-22T15:29:08.617112+00:00 app[web.1]:←[0m   script/rails:6:in `requi
re'
←[36m2015-04-22T15:29:08.617113+00:00 app[web.1]:←[0m   script/rails:6:in `<main
>'
←[36m2015-04-22T15:29:08.617107+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:55:in `block in <top (required)
>'
←[36m2015-04-22T15:29:08.617098+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:32:in `start'
←[36m2015-04-22T15:29:08.617202+00:00 app[web.1]:←[0m [2015-04-22 15:29:08] INFO
  going to shutdown ...
←[36m2015-04-22T15:29:08.617297+00:00 app[web.1]:←[0m [2015-04-22 15:29:08] INFO
  WEBrick::HTTPServer#start done.
←[36m2015-04-22T15:29:08.617376+00:00 app[web.1]:←[0m Exiting
←[36m2015-04-22T15:29:08.617101+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:13:in `run'
←[36m2015-04-22T15:29:08.617108+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands.rb:50:in `tap'
←[36m2015-04-22T15:29:08.617099+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:160:in `start'
←[36m2015-04-22T15:29:08.617103+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
←[36m2015-04-22T15:29:08.617105+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/
2.0.0/gems/railties-3.2.21/lib/rails/commands/server.rb:70:in `start'
←[36m2015-04-22T15:29:08.617096+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l
ib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
←[36m2015-04-22T15:29:08.617089+00:00 app[web.1]:←[0m [2015-04-22 15:29:08] FATA
L SignalException: SIGTERM
←[36m2015-04-22T15:29:09.777442+00:00 heroku[web.1]:←[0m Process exited with sta
tus 143

您可以在这里找到我在 Heroku 上的应用的构建日志:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using 1.7.12
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
       Fetching gem metadata from https://rubygems.org/............
       Resolving dependencies...
       Using rake 10.4.2
       Using i18n 0.7.0
       Using builder 3.0.4
       Using erubis 2.7.0
       Using multi_json 1.11.0
       Using journey 1.0.4
       Using rack 1.4.5
       Using hike 1.2.3
       Using tilt 1.4.1
       Using mime-types 1.25.1
       Using polyglot 0.3.5
       Using arel 3.0.3
       Using tzinfo 0.3.43
       Using bundler 1.7.12
       Using coffee-script-source 1.9.1.1
       Using execjs 2.5.2
       Using json 1.8.2
       Using thor 0.19.1
       Using pg 0.18.1
       Using sass 3.4.13
       Using rack-cache 1.2
       Using rack-test 0.6.3
       Using rack-ssl 1.3.4
       Using treetop 1.4.15
       Using activesupport 3.2.21
       Using sprockets 2.2.3
       Using rdoc 3.12.2
       Using mail 2.5.4
       Using activemodel 3.2.21
       Using activerecord 3.2.21
       Using activeresource 3.2.21
       Using actionpack 3.2.21
       Using actionmailer 3.2.21
       Using railties 3.2.21
       Using rails 3.2.21
       Using sass-rails 3.2.6
       Using jquery-rails 3.1.2
       Using coffee-script 2.4.1
       Using coffee-rails 3.2.2
       Using uglifier 2.7.1
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (27.09s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/Rakefile:7)
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/Rakefile:7)
       Warning. Error encountered while saving cache /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/tmp/cache/sass/fa3b46a24cd2ed44f3a4308a38aea27e493d00ff/home.css.scssc: can't dump anonymous class #<Class:0x007f2f15396c28>
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/Rakefile:7)
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/Rakefile:7)
       Warning. Error encountered while saving cache /tmp/build_62b0729b72e189f39d2719f5a6a39ffb/tmp/cache/sass/fa3b46a24cd2ed44f3a4308a38aea27e493d00ff/home.css.scssc: can't dump anonymous class #<Class:0x007f0e74274668>
       Asset precompilation completed (15.30s)
###### WARNING:
       Injecting plugin 'rails_log_stdout'
###### WARNING:
       Injecting plugin 'rails3_serve_static_assets'
###### WARNING:
       Add 'rails_12factor' gem to your Gemfile to skip plugin injection
###### WARNING:
       You have not declared a Ruby version in your Gemfile.
       To set your Ruby version add this line to your Gemfile:
       ruby '2.0.0'
       # See https://devcenter.heroku.com/articles/ruby-versions for more information.
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
###### WARNING:
       No Procfile detected, using the default web server (webrick)
       https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Ruby  -> console, rake, web, worker
-----> Compressing... done, 26.2MB
-----> Launching... done, v7
       https://peaceful-gorge-9214.herokuapp.com/ deployed to Heroku

提前感谢您的帮助。

我已经查看了这些讨论:

Heroku — "We're sorry, but something went wrong"

Rails 2.3-style plugins and deprecation warnings running task in Heroku

http://www.theodinproject.com/ruby-on-rails/deployment

【问题讨论】:

  • 如何包含 default.css?
  • 你在使用缓存存储吗?
  • 我不知道我是包含 default.css 还是使用缓存存储。我怎么知道我是否这样做?它有什么影响?

标签: ruby-on-rails git postgresql heroku database-migration


【解决方案1】:

我认为您的迁移实际上并未运行。在Running rake db:migrate attached to terminal... up, run.1040 和那些折旧警告之后运行heroku run rake db:migrate 应该有一些输出。

检查您的数据库架构以验证您的迁移是否在您的数据库上运行。使用run heroku pg:psql 打开 Postgres 控制台,然后使用\d tablename 检查您的架构。我还会检查您的数据库配置文件 (config/database.yml) 以确保为 postgres 正确设置了生产数据库。

【讨论】:

  • 感谢您的快速响应。我认为 database.yml 文件没问题。适配器是“postgresql”,数据库名,用户和密码也不错。它们对于开发、测试和生产都是一样的。但是我无法做到你所说的关于 Postgres 控制台的事情。我怎样才能得到那个控制台?我从 Git Bash 进行了尝试(我在那一次做了所有事情,所以,我尝试了)但它没有用。感谢您的帮助,请耐心等待,我是零经验的爱好者。但我愿意学习=)
猜你喜欢
  • 2016-02-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-12
  • 2012-05-17
  • 2012-08-16
  • 1970-01-01
  • 2012-07-29
相关资源
最近更新 更多