1

これは私には奇妙に思えます。Rails api を rails 3.2 から rails 4.0.0.rc1 にアップグレードしました。

すべてのテストはローカルで合格し、ローカルでの運用モードでも問題なく動作します。

ただし、Heroku にデプロイすると、ログにアプリの起動に失敗したことが示されます。奇妙なことに、ログに rails server コマンドが表示された後、「rails new -h」と入力したかのように出力が表示されます。

彼女は私の小さなアプリの githubです。これが私のherokuログです:

› heroku logs  
2013-05-24T20:37:18.023853+00:00 heroku[web.1]: State changed from crashed to starting
2013-05-24T20:37:20.904692+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 39526 -e production`
2013-05-24T20:37:21.886451+00:00 app[web.1]: Options:
2013-05-24T20:37:21.886451+00:00 app[web.1]: Usage:
2013-05-24T20:37:21.886451+00:00 app[web.1]:   rails new APP_PATH [options]
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -m, [--template=TEMPLATE]      # Path to some application template (can be a filesystem path or URL)
2013-05-24T20:37:21.888820+00:00 app[web.1]:                                  # Default: /app/vendor/ruby-2.0.0/bin/ruby
2013-05-24T20:37:21.888820+00:00 app[web.1]:       [--skip-gemfile]           # Don't create a Gemfile
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -O, [--skip-active-record]     # Skip Active Record files
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -G, [--skip-git]               # Skip .gitignore file
2013-05-24T20:37:21.889145+00:00 app[web.1]:                                  # Default: jquery
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -B, [--skip-bundle]            # Don't run bundle install
2013-05-24T20:37:21.888820+00:00 app[web.1]:       [--skip-keeps]             # Skip source control .keep files
2013-05-24T20:37:21.889145+00:00 app[web.1]:   -J, [--skip-javascript]        # Skip JavaScript files
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -S, [--skip-sprockets]         # Skip Sprockets files
2013-05-24T20:37:21.889145+00:00 app[web.1]:   -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
2013-05-24T20:37:21.888820+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-05-24T20:37:21.889145+00:00 app[web.1]:                                  # Default: sqlite3
2013-05-24T20:37:21.886451+00:00 app[web.1]:
2013-05-24T20:37:21.889145+00:00 app[web.1]:       [--dev]                    # Setup the application with Gemfile pointing to your Rails checkout
2013-05-24T20:37:21.889145+00:00 app[web.1]:       [--edge]                   # Setup the application with Gemfile pointing to Rails repository
2013-05-24T20:37:21.889145+00:00 app[web.1]:   -T, [--skip-test-unit]         # Skip Test::Unit files
2013-05-24T20:37:21.889145+00:00 app[web.1]:       [--rc=RC]                  # Path to file containing extra configuration options for rails command
2013-05-24T20:37:21.889145+00:00 app[web.1]:       [--no-rc]                  # Skip loading of extra configuration options from .railsrc file
2013-05-24T20:37:21.889398+00:00 app[web.1]: Runtime options:
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -f, [--force]    # Overwrite files that already exist
2013-05-24T20:37:21.889145+00:00 app[web.1]:
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -p, [--pretend]  # Run but do not make any changes
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -q, [--quiet]    # Suppress status output
2013-05-24T20:37:21.888820+00:00 app[web.1]:   -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -s, [--skip]     # Skip
 files that already exist
2013-05-24T20:37:21.889398+00:00 app[web.1]: Rails options:
2013-05-24T20:37:21.889398+00:00 app[web.1]:
2013-05-24T20:37:21.889398+00:00 app[web.1]:
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -h, [--help]     # Show this help message and quit
2013-05-24T20:37:21.889398+00:00 app[web.1]:   -v, [--version]  # Show Rails version number and quit
2013-05-24T20:37:21.889654+00:00 app[web.1]:     directory structure and configuration at the path you specify.
2013-05-24T20:37:21.889654+00:00 app[web.1]:
2013-05-24T20:37:21.889654+00:00 app[web.1]:     The 'rails new' command creates a new Rails application with a default
2013-05-24T20:37:21.889654+00:00 app[web.1]: Description:
2013-05-24T20:37:21.889654+00:00 app[web.1]:     You can specify extra command-line arguments to be used every time
2013-05-24T20:37:21.889654+00:00 app[web.1]:     'rails new' runs in the .railsrc configuration file in your home directory.
2013-05-24T20:37:21.889654+00:00 app[web.1]:     Note that the arguments specified in the .railsrc file don't affect the
2013-05-24T20:37:21.889898+00:00 app[web.1]: Example:
2013-05-24T20:37:21.889654+00:00 app[web.1]:
2013-05-24T20:37:21.889654+00:00 app[web.1]:
2013-05-24T20:37:21.889898+00:00 app[web.1]:
2013-05-24T20:37:21.889654+00:00 app[web.1]:     defaults values shown above in this help message.
2013-05-24T20:37:21.889898+00:00 app[web.1]:     This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
2013-05-24T20:37:21.889898+00:00 app[web.1]:     See the README in the newly created application to get going.
2013-05-24T20:37:21.889898+00:00 app[web.1]:     rails new ~/Code/Ruby/weblog
2013-05-24T20:37:29.907618+00:00 heroku[web.1]: Process exited with status 0
2013-05-24T20:37:29.918034+00:00 heroku[web.1]: State changed from starting to crashed
4

1 に答える 1

1

この記事を教えてくれた #RubyOnRails irc チャンネルの drale2k のおかげで解決しました

基本的に、Procfile が必要です (これは私が持っておらず、Rails 3.2 で実行していたときには必要ありませんでした)。

于 2013-05-24T21:08:08.833 に答える