加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails-3 – 在heroku上的therubyracer错误为“无法通过B

发布时间:2020-12-17 02:04:38 所属栏目:百科 来源:网络整理
导读:当我将我的应用程序推送到heroku时,它会给我以下错误 ----- Ruby/Rails app detected----- Installing dependencies using Bundler version 1.3.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -
当我将我的应用程序推送到heroku时,它会给我以下错误

-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       You are trying to install in deployment mode after changing
       your Gemfile. Run `bundle install` elsewhere and add the
       updated Gemfile.lock to version control.
       You have added to the Gemfile:
       * therubyracer
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected,failed to compile Ruby/Rails app

我删除了我的Gemlock文件并再次捆绑安装它但仍然给我同样的错误.我也试过捆绑安装 – 没有开发:测试生产它也给我同样的错误我该怎么办.这是我的Gemfile

source 'https://rubygems.org'

gem 'rails','3.2.9'

gem 'carrierwave'
gem 'newrelic_rpm'

#gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS

#gem "twitter-bootstrap-rails"
gem 'will_paginate','3.0.3'
#gem 'bootstrap-will_paginate','0.0.6'
# Bundle edge Rails instead:
# gem 'rails',:git => 'git://github.com/rails/rails.git'

#gem 'mysql2'
gem 'dynamic_form'
gem 'therubyracer','0.10.2',:platforms => :ruby
gem 'devise'
gem 'hirb'

# Gems used for Facebook
gem 'facebook_oauth'
gem 'oauth','0.4.7'
gem 'will_paginate','3.0.3'
gem 'bootstrap-will_paginate','0.0.6'
gem 'thin'
gem 'pg'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
  #gem 'sass-rails','~> 3.2.3'
  gem 'coffee-rails','~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes

  gem 'uglifier','>= 1.0.3'
end

gem 'jquery-rails'

解决方法

尝试运行bundle install而不是将更改推送到远程repo.

此外,如果您使用therubyracer进行资产编译,您可以在本地预编译资产并阅读此文档:
https://devcenter.heroku.com/articles/rails-asset-pipeline#compiling-assets-locally
https://devcenter.heroku.com/articles/rails-asset-pipeline#therubyracer

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读