2013-06-27 171 views
0

你好,我剛剛開始學習Ruby on Rails,並且正在觀看Railstutoprials屏幕轉換。然而,當我做我的git推到heroku並嘗試加載我的rails應用程序時,我得到一個錯誤,我的日誌看起來像這樣。部署Rails應用程序到Heroku時的錯誤

2013-06-26T22:41:06.427464+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 55907 -e $RAILS_ENV` 
2013-06-26T22:41:07.770202+00:00 app[web.1]: 
2013-06-26T22:41:07.770515+00:00 app[web.1]: Options: 
2013-06-26T22:41:07.770114+00:00 app[web.1]: rails new APP_PATH [options] 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -m, [--template=TEMPLATE]  # Path to some application template (can be a filesystem path or URL) 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -r, [--ruby=PATH]    # Path to the Ruby binary of your choice 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -B, [--skip-bundle]   # Don't run bundle install 
2013-06-26T22:41:07.770029+00:00 app[web.1]: Usage: 
2013-06-26T22:41:07.771962+00:00 app[web.1]:         # Default: sqlite3 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -d, [--database=DATABASE]  # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 
2013-06-26T22:41:07.771962+00:00 app[web.1]: -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library 
2013-06-26T22:41:07.771778+00:00 app[web.1]:         # Default: /app/vendor/ruby-2.0.0/bin/ruby 
2013-06-26T22:41:07.771778+00:00 app[web.1]:  [--skip-gemfile]   # Don't create a Gemfile 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -O, [--skip-active-record]  # Skip Active Record files 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -G, [--skip-git]    # Skip .gitignore file 
2013-06-26T22:41:07.771962+00:00 app[web.1]: -J, [--skip-javascript]  # Skip JavaScript files 
2013-06-26T22:41:07.771778+00:00 app[web.1]:  [--skip-keeps]    # Skip source control .keep files 
2013-06-26T22:41:07.771778+00:00 app[web.1]: -S, [--skip-sprockets]   # Skip Sprockets files 
2013-06-26T22:41:07.771962+00:00 app[web.1]:         # Default: jquery 
2013-06-26T22:41:07.771962+00:00 app[web.1]:  [--edge]     # Setup the application with Gemfile pointing to Rails repository 
2013-06-26T22:41:07.771962+00:00 app[web.1]: -T, [--skip-test-unit]   # Skip Test::Unit files 
2013-06-26T22:41:07.771962+00:00 app[web.1]:  [--rc=RC]     # Path to file containing extra configuration options for rails command 
2013-06-26T22:41:07.771962+00:00 app[web.1]:  [--dev]     # Setup the application with Gemfile pointing to your Rails checkout 
2013-06-26T22:41:07.771962+00:00 app[web.1]:  [--no-rc]     # Skip loading of extra configuration options from .railsrc file 
2013-06-26T22:41:07.771962+00:00 app[web.1]: 
2013-06-26T22:41:07.772167+00:00 app[web.1]: Runtime options: 
2013-06-26T22:41:07.772167+00:00 app[web.1]: -f, [--force] # Overwrite files that already exist 
2013-06-26T22:41:07.772167+00:00 app[web.1]: -p, [--pretend] # Run but do not make any changes 
2013-06-26T22:41:07.773137+00:00 app[web.1]: Rails options: 
2013-06-26T22:41:07.772167+00:00 app[web.1]: -s, [--skip]  # Skip files that already exist 
2013-06-26T22:41:07.772167+00:00 app[web.1]: -q, [--quiet] # Suppress status output 
2013-06-26T22:41:07.772167+00:00 app[web.1]: 
2013-06-26T22:41:07.773756+00:00 app[web.1]: Description: 
2013-06-26T22:41:07.773217+00:00 app[web.1]: -v, [--version] # Show Rails version number and quit 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  The 'rails new' command creates a new Rails application with a default 
2013-06-26T22:41:07.773217+00:00 app[web.1]: -h, [--help]  # Show this help message and quit 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  directory structure and configuration at the path you specify. 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  'rails new' runs in the .railsrc configuration file in your home directory. 
2013-06-26T22:41:07.773217+00:00 app[web.1]: 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  defaults values shown above in this help message. 
2013-06-26T22:41:07.773756+00:00 app[web.1]: 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  You can specify extra command-line arguments to be used every time 
2013-06-26T22:41:07.773756+00:00 app[web.1]:  Note that the arguments specified in the .railsrc file don't affect the 
2013-06-26T22:41:07.773756+00:00 app[web.1]: 
2013-06-26T22:41:07.773756+00:00 app[web.1]: 
2013-06-26T22:41:07.773989+00:00 app[web.1]: Example: 
2013-06-26T22:41:07.773989+00:00 app[web.1]: 
2013-06-26T22:41:07.773989+00:00 app[web.1]:  See the README in the newly created application to get going. 
2013-06-26T22:41:07.773989+00:00 app[web.1]:  rails new ~/Code/Ruby/weblog 
2013-06-26T22:41:07.773989+00:00 app[web.1]:  This generates a skeletal Rails installation in ~/Code/Ruby/weblog. 
2013-06-26T22:41:09.160872+00:00 heroku[web.1]: Process exited with status 0 
2013-06-26T22:41:09.172961+00:00 heroku[web.1]: State changed from starting to crashed 

我的Gemfile看起來像:

source 'https://rubygems.org' 

ruby '2.0.0' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.0.0' 

# Use postgresql as the database for Active Record 
gem 'pg', group: :production 

gem 'sqlite3', group: [:test, :development] 

# Use V8 JavaScript engine 
gem 'therubyracer' 

# Use SCSS for stylesheets 
gem 'sass-rails', '~> 4.0.0' 

# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 

# Use CoffeeScript for .js.coffee assets and views 
gem 'coffee-rails', '~> 4.0.0' 

# Use jquery as the JavaScript library 
gem 'jquery-rails' 

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 1.2' 

gem 'rails_12factor' 

group :doc do 
    # bundle exec rake doc:rails generates the API under doc/api. 
    gem 'sdoc', require: false 
end 

# Use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Use Capistrano for deployment 
# gem 'capistrano', group: :development 

# Use debugger 
# gem 'debugger', group: [:development, :test] 

,最後我的database.yml

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
development: 
    adapter: sqlite3 
    database: db/development.sqlite3 
    pool: 5 
    timeout: 5000 

# Warning: The database defined as "test" will be erased and 
# re-generated from your development database when you run "rake". 
# Do not set this db to the same as development or production. 
test: 
    adapter: sqlite3 
    database: db/test.sqlite3 
    pool: 5 
    timeout: 5000 

production: 
    adapter: postgresql 
    database: social_pantry 
    pool: 5 
    timeout: 5000 
+0

看起來像它試圖在一個不是rails項目的目錄上執行'rails server'命令。你的app_path設置是否正確? – usha

+0

我剛刪除舊的應用程序,並做了一個新的heroku創建,它仍然給我一個確切的錯誤。我如何檢查我的app_path。我對軌道很陌生。 – twreid

+0

我對heroku不是很熟悉。但是應該有一些配置來設置命令在服務器上執行的路徑嗎? – usha

回答

1

看起來像它試圖從一個目錄而不是一個Rails項目執行軌服務器命令。在您的配置中設置正確的應用程序路徑。

相關問題