Heroku应用程序错误 - rails / commands / server.rb:12:在`解析!':缺少参数:-e(OptionParser :: MissingArgument)

时间:2015-12-09 16:59:14

标签: ruby-on-rails heroku

我正在尝试在heroku上部署rails应用程序。

部署工作正常,我可以毫无问题地运行heroku控制台,

然而,当我尝试在heroku上运行应用程序时,我收到了一个应用程序错误:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

如果我尝试在本地使用heroku运行应用程序,我会得到:

web.1  | /Users/snowflakekiller/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/server.rb:12:in `parse!': missing argument: -e (OptionParser::MissingArgument)
web.1  |    from /Users/snowflakekiller/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `new'

这是我的宝石文件:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'bootstrap-sass', '~> 3.2.0'
gem 'autoprefixer-rails'
gem 'bootstrap_form'
gem 'kaminari'
gem 'carrierwave'
gem "rmagick", :require => 'RMagick'
gem 'ckeditor'
gem 'acts_as_commentable'
gem 'addressable'
gem 'vimeo'
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

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

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'pry'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'

end

这是我的heroku日志:

2015-12-09T16:53:28.606103+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-12-09T16:53:28.606110+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-12-09T16:53:28.606105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-12-09T16:53:29.326350+00:00 heroku[web.1]: State changed from starting to crashed
2015-12-09T16:53:31.608084+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sickbubble.herokuapp.com request_id=dffabe0d-b895-4d50-8dfc-bb09f8878c4e fwd="175.139.1.56" dyno= connect= service= status=503 bytes=

我的procfile看起来像这样

web: bundle exec rails server thin -p $PORT -e $RACK_ENV

任何想法?它成功部署并且我可以运行heroku rails控制台的事实让我失望

1 个答案:

答案 0 :(得分:1)

我...我的gemfile中没有gem 'thin'。哎呀。