Heroku:耙子流产了

时间:2013-07-29 10:09:56

标签: ruby-on-rails ruby ruby-on-rails-3 heroku

我正在尝试在Heroku上运行db:migrate(应用程序在本地工作正常),我收到此错误:

rake aborted!
uninitialized constant Bootstrap::Rails::Engine::Sass
/app/vendor/bundle/ruby/2.0.0/bundler/gems/bootstrap-rails-8eb1287f94b3/lib/bootstrap-rails/engine.rb:6:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

的Gemfile:

source 'https://rubygems.org'
ruby "2.0.0"

gem 'rails', '4.0.0'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  #gem 'therubyracer'
  #gem 'less-rails'
  #gem 'twitter-bootstrap-rails'
  gem 'uglifier', '>= 1.0.3'
end

gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
                              :github => 'anjlab/bootstrap-rails',
                              :branch => '3.0.0'

gem 'railties', '>=4.0.0'
gem 'protected_attributes'

gem 'jquery-rails'
gem 'foreman'
# PostgreSQL
gem 'pg'

# Use Unicorn as the app server
gem 'unicorn'

# Devise for user accounts management
gem 'devise'

# Stripe for processing payments
gem 'stripe'

# New Relic monitoring
gem 'newrelic_rpm'

# QR Code generation
gem 'rqrcode-rails3'

# User auth
gem 'cancan'

group :development do
  gem 'debugger'
  gem 'better_errors'
  gem "binding_of_caller"
  gem 'meta_request'  
end

1 个答案:

答案 0 :(得分:1)

删除资产组,因为它不再存在于Rails4中。

只需将其中包含的宝石移动到全局空间

即可
# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  #gem 'therubyracer'
  #gem 'less-rails'
  #gem 'twitter-bootstrap-rails'
  gem 'uglifier', '>= 1.0.3'
end

# becomes

# group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  #gem 'therubyracer'
  #gem 'less-rails'
  #gem 'twitter-bootstrap-rails'
  gem 'uglifier', '>= 1.0.3'
# end