我有rails应用程序和本地一切正常(服务器启动等)
但是,当我不想在heroku上运行我的应用程序时,我遇到了问题(当我输入git push heroku master
时:
remote:安装capybara 2.4.4 remote:remote:
Gem :: Ext :: BuildError:错误:无法构建gem原生扩展。 遥控器:遥控器:
/tmp/build_e1c43ae12e0eb81663efdbfcf4917456/vendor/ruby-2.1.5/bin/ruby extconf.rb remote: * extconf.rb失败* 远程:
由于某些原因,可能无法创建Makefile 必要的远程:库和/或标头。检查mkmf.log 文件了解更多详情。您可以远程:需要配置 选项。 remote:remote:提供的配置 选项:远程: - with-opt-dir remote:
--without-opt-dir remote: - with-opt-include remote: - without-opt-include = $ {opt-dir} / include remote: - with-opt-lib remote: - without-opt -lib = $ {opt-dir} / lib remote:
--with-make-prog remote: - without-make-prog remote:--srcdir =。 remote:--curdir remote:--ruby = / tmp / build_e1c43ae12e0eb81663efdbfcf4917456 / vendor / ruby-2.1.5 / bin / ruby remote: - with-gl-dir remote: - with-gl-dir remote:
--with-gl-include remote: - without-gl-include = $ {gl-dir} / include remote: - with-gl-lib remote: - without-gl-lib = $ {gl-dir} / lib remote:
--with-zlib-dir remote: - with-zlib-dir remote: - with-zlib-include remote: - without-zlib-include = $ {zlib-dir} / include remote: - with-zlib -lib remote: - without-zlib-lib = $ {zlib-dir} / lib remote:命令'qmake'不可用remote:remote: extconf失败,退出代码1远程:远程:Gem文件 将继续安装 /tmp/build_e1c43ae12e0eb81663efdbfcf4917456/vendor/bundle/ruby/2.1.0/gems/capybara-webkit-1.6.0 检查。 remote:记录结果 /tmp/build_e1c43ae12e0eb81663efdbfcf4917456/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/capybara-webkit-1.6.0/gem_make.out remote:安装capybara-webkit时发生错误 (1.6.0),而Bundler无法远程:继续。遥控器:
确保gem install capybara-webkit -v '1.6.0'
成功 在远程之前:捆绑。远程:!远程:!失败 通过Bundler安装宝石。远程:!遥控器:遥控器:!推 拒绝,无法编译Ruby app remote:remote:验证 部署....远程:远程:!推弃被拒绝到foosballtr。远程:到 https://git.heroku.com/foosballtr.git! [远程拒绝]主人 - > master(pre-receive hook拒绝)错误:无法将某些引用推送到 'https://git.heroku.com/foosballtr.git'
这是我的Gemfile:
source 'https://rubygems.org'
ruby '2.1.5'
gem 'rails', '4.1.8'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem "paperclip", "~> 4.3"
gem 'bootstrap-sass', '~> 3.3.5'
gem 'jquery-ui-rails'
gem 'jquery-turbolinks'
gem 'sprockets'
gem 'capybara-webkit'
gem "chartkick"
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
gem 'guard-rspec'
gem 'factory_girl_rails'
# gem 'pry-rails'
gem 'rspec-rails'
gem 'selenium-webdriver'
gem 'capybara'
end
答案 0 :(得分:5)
将gem 'capybara-webkit'
移至:development, :test
群组,无需投放生产:
许多应用都依赖于需要原生扩展的宝石 在部署目标上编译。
group :development, :test do
gem 'guard-rspec'
gem 'factory_girl_rails'
# gem 'pry-rails'
gem 'rspec-rails'
gem 'capybara-webkit'
gem 'selenium-webdriver'
gem 'capybara'
end
答案 1 :(得分:0)
尝试在您的gem文件中更改:
gem "capybara-webkit", github: "thoughtbot/capybara-webkit", branch: "1.0"