2013-07-17 37 views
0

我檢查對此每一個崗位,但它似乎並沒有解決我的問題.. 這裏就是我在environment/production試圖Heroku爲什麼說「出了問題」?

改變config.assets.compile = falsetrue,因爲它可能是編譯的問題(參考這個Heroku — "We're sorry, but something went wrong"

heroku run rake db:migrate ...似乎在大多數情況下的解決方案,但問題是我沒有一個數據庫..它表明這個結果

Running `rake db:migrate` attached to terminal... up, run.3272 
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 bu 
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/201 
eased. (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 bu 
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/201 
eased. (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 bu 
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/201 

Ë VEN heroku logs有這個廢棄警告

←[36m2013-07-17T07:45:32.553996+00:00 heroku[web.1]:←[0m Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 20199` 
←[36m2013-07-17T07:45:34.178981+00:00 heroku[web.1]:←[0m Stopping all processes with SIGTERM 
←[36m2013-07-17T07:45:35.587040+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plug 
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 not 
.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
←[36m2013-07-17T07:45:35.587536+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plug 
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 not 
.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
←[36m2013-07-17T07:45:35.586908+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plug 
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 not 
.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
←[36m2013-07-17T07:45:36.183427+00:00 heroku[web.1]:←[0m Process exited with status 0 
←[36m2013-07-17T07:45:37.602911+00:00 app[web.1]:←[0m >> Listening on 0.0.0.0:20199, CTRL+C to stop 
←[36m2013-07-17T07:45:37.602821+00:00 app[web.1]:←[0m >> Maximum connections set to 1024 
←[36m2013-07-17T07:45:37.602821+00:00 app[web.1]:←[0m >> Thin web server (v1.5.1 codename Straight Razor) 
←[36m2013-07-17T07:45:37.750492+00:00 heroku[web.1]:←[0m State changed from starting to up 
←[36m2013-07-17T07:45:38.863569+00:00 app[web.1]:←[0m Started GET "/" for 180.194.29.171 at 2013-07-17 07:45:38 +0000 
←[36m2013-07-17T07:45:39.426857+00:00 app[web.1]:←[0m Connecting to database specified by DATABASE_URL 
←[36m2013-07-17T07:45:39.646018+00:00 app[web.1]:←[0m Processing by WelcomeController#index as HTML 
←[36m2013-07-17T07:45:39.950625+00:00 app[web.1]:←[0m Rendered welcome/index.html.erb within layouts/application (275.2ms) 

這裏的日誌的其餘部分:

←[35m2013-07-17T07:36:43.950427+00:00 heroku[run.3272]:←[0m State changed from up to complete 
←[35m2013-07-17T07:36:43.928758+00:00 heroku[run.3272]:←[0m Process exited with status 0 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  2: <head> 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  5: <%= javascript_include_tag "welcome" %> 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m (in /app/app/assets/javascripts/welcome.js)): 
←[36m2013-07-17T07:38:16.884008+00:00 app[web.1]:←[0m Processing by WelcomeController#index as HTML 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  8: </head> 
←[36m2013-07-17T07:38:16.891422+00:00 app[web.1]:←[0m app/views/welcome/index.html.erb:5:in `_app_views_welcome_index_html_erb___350577225301439618 
←[36m2013-07-17T07:38:16.887951+00:00 app[web.1]:←[0m Rendered welcome/index.html.erb within layouts/application (2.9ms) 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  6: <%= javascript_include_tag "connectFour" %> 
←[36m2013-07-17T07:38:16.880639+00:00 app[web.1]:←[0m Started GET "/" for 180.194.29.171 at 2013-07-17 07:38:16 +0000 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  3: <title>ConnectFour</title> 
←[36m2013-07-17T07:38:16.888300+00:00 app[web.1]:←[0m Completed 500 Internal Server Error in 4ms 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m ActionView::Template::Error (cannot load such file -- uglifier 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  7: <%= csrf_meta_tags %> 
←[36m2013-07-17T07:38:16.891236+00:00 app[web.1]:←[0m  4: <%= stylesheet_link_tag "application", :media => "all" %> 
←[36m2013-07-17T07:38:16.891422+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:38:16.891422+00:00 app[web.1]:←[0m 
←[33m2013-07-17T07:38:16.889783+00:00 heroku[router]:←[0m at=info method=GET path=/ host=dry-tundra-9704.herokuapp.com fwd="180.194.29.171" dyno=web. 
500 bytes=643 
←[33m2013-07-17T07:38:18.527722+00:00 heroku[router]:←[0m at=info method=GET path=/favicon.ico host=dry-tundra-9704.herokuapp.com fwd="180.194.29.171 
ms status=200 bytes=0 
←[36m2013-07-17T07:40:59.052597+00:00 app[web.1]:←[0m Started GET "/" for 180.194.29.171 at 2013-07-17 07:40:59 +0000 
←[36m2013-07-17T07:40:59.057092+00:00 app[web.1]:←[0m Processing by WelcomeController#index as HTML 
←[36m2013-07-17T07:40:59.060778+00:00 app[web.1]:←[0m Rendered welcome/index.html.erb within layouts/application (3.1ms) 
←[36m2013-07-17T07:40:59.060858+00:00 app[web.1]:←[0m Completed 500 Internal Server Error in 4ms 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m (in /app/app/assets/javascripts/welcome.js)): 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m ActionView::Template::Error (cannot load such file -- uglifier 
←[36m2013-07-17T07:40:59.066252+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  4: <%= stylesheet_link_tag "application", :media => "all" %> 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  2: <head> 
←[36m2013-07-17T07:40:59.066252+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  8: </head> 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  3: <title>ConnectFour</title> 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  5: <%= javascript_include_tag "welcome" %> 
←[36m2013-07-17T07:40:59.066252+00:00 app[web.1]:←[0m app/views/welcome/index.html.erb:5:in `_app_views_welcome_index_html_erb___350577225301439618 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  6: <%= javascript_include_tag "connectFour" %> 
←[36m2013-07-17T07:40:59.066089+00:00 app[web.1]:←[0m  7: <%= csrf_meta_tags %> 
←[33m2013-07-17T07:40:59.070059+00:00 heroku[router]:←[0m at=info method=GET path=/ host=dry-tundra-9704.herokuapp.com fwd="180.194.29.171" dyno=web. 
500 bytes=643 
←[33m2013-07-17T07:41:00.133064+00:00 heroku[router]:←[0m at=info method=GET path=/favicon.ico host=dry-tundra-9704.herokuapp.com fwd="180.194.29.171 
ms status=200 bytes=0 
2013-07-17T07:44:51+00:00 heroku[slug-compiler]: Slug compilation started 
←[36m2013-07-17T07:45:30.985926+00:00 heroku[web.1]:←[0m State changed from up to starting 
2013-07-17T07:45:31+00:00 heroku[slug-compiler]: Slug compilation finished 
←[36m2013-07-17T07:45:32.553996+00:00 heroku[web.1]:←[0m Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 20199` 
←[36m2013-07-17T07:45:34.178981+00:00 heroku[web.1]:←[0m Stopping all processes with SIGTERM 
[36m2013-07-17T07:45:36.183427+00:00 heroku[web.1]:←[0m Process exited with status 0 
←[36m2013-07-17T07:45:37.602911+00:00 app[web.1]:←[0m >> Listening on 0.0.0.0:20199, CTRL+C to stop        Server Error in 305ms 
←[36m2013-07-17T07:45:37.602821+00:00 app[web.1]:←[0m >> Maximum connections set to 1024            ←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:← 
←[36m2013-07-17T07:45:37.602821+00:00 app[web.1]:←[0m >> Thin web server (v1.5.1 codename Straight Razor)       [0m  2: <head> 
←[36m2013-07-17T07:45:37.750492+00:00 heroku[web.1]:←[0m State changed from starting to up                  ←[36m2013-07-17T07:45:3 
←[36m2013-07-17T07:45:38.863569+00:00 app[web.1]:←[0m Started GET "/" for 180.194.29.171 at 2013-07-17 07:45:38 +0000    9.953395+00:00 app[web.1]:←[0m app/views/welcome/i 
←[36m2013-07-17T07:45:39.426857+00:00 app[web.1]:←[0m Connecting to database specified by DATABASE_URL 
←[36m2013-07-17T07:45:39.646018+00:00 app[web.1]:←[0m Processing by WelcomeController#index as HTML         ←[36m2013-07-17T07:45:39.953217+00:00 app[web.1] 
←[36m2013-07-17T07:45:39.950625+00:00 app[web.1]:←[0m Rendered welcome/index.html.erb within layouts/application (275.2ms)  :←[0m  6: <%= javascript_include_tag "connectFo 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m ActionView::Template::Error (cannot load such file -- uglifier            ←[33m2013-07-17T07:45 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  3: <title>ConnectFour</title>           0 
←[33m2013-07-17T07:45:39.954812+00:00 heroku[router]:←[0m at=info method=GET path=/ host=dry-tundra-9704.herokuapp.com fwd="180.194 
s=500 bytes=643 
←[36m2013-07-17T07:45:39.950710+00:00 app[web.1]:←[0m Completed 500 Internal Server Error in 305ms 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m (in /app/app/assets/javascripts/welcome.js)): 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  2: <head> 
←[36m2013-07-17T07:45:39.953395+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  4: <%= stylesheet_link_tag "application", :media => "all" %> 
←[36m2013-07-17T07:45:39.953395+00:00 app[web.1]:←[0m app/views/welcome/index.html.erb:5:in `_app_views_welcome_index_html_erb__1768954839152578095 
←[36m2013-07-17T07:45:39.953395+00:00 app[web.1]:←[0m 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  8: </head> 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  5: <%= javascript_include_tag "welcome" %> 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  6: <%= javascript_include_tag "connectFour" %> 
←[36m2013-07-17T07:45:39.953217+00:00 app[web.1]:←[0m  7: <%= csrf_meta_tags %> 
←[33m2013-07-17T07:45:41.221022+00:00 heroku[router]:←[0m at=info method=GET path=/favicon.ico host=dry-tundra-9704.herokuapp.com fwd="180.194.29.171 

我想我的Gemfile是確定在這裏:

source 'https://rubygems.org' 

ruby '1.9.3' 

gem 'rails', '3.2.13' 
group :development do 
    gem 'sqlite3' 
end 

group :production do 
    gem 'thin' 
    gem 'pg' 
end 

,也有這個

-----> WARNINGS: 
     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. 

w每當我部署我的應用程序時,都會顯示此事。在重寫Gemfile之前我已經刪除了這個文件,但是當我將它部署到應用程序時,它已經生成了。

可能是什麼原因造成的?

+0

你的日誌說它沒有找到uglifier寶石。你有沒有在GemFile中加入?如果沒有,那麼添加組:資產做「寶石uglifier」結束,然後推送到heroku。 – Debadatt

+0

就是這樣,非常感謝! 所以如果一個寶石丟失,我只需要將它添加到Gemfile? – OneScrewLoose

+0

是的。沒關係。看到我的答案吼叫。 – Debadatt

回答

1

您正在失去uglifier gem。你需要添加它並推送到heroku

group :assets do 
    gem 'uglifier' 
end 
1

你的Heroku的錯誤是

ActionView::Template::Error (cannot load such file -- uglifier

請加寶石

gem 'uglifier' 

在Gemfile中

2)然後在本地

3)運行bundle安裝,然後git的加,git commit,git push heroku