搜索器宝石和ActiveRecord的
问题描述:
如果我在Gemfile中使用:搜索器宝石和ActiveRecord的
gem "searcher", github: "radar/searcher"
捆绑安装完美。但我想部署的Heroku和我得到这个错误回报:
$ git push heroku master
Counting objects: 1277, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1218/1218), done.
Writing objects: 100% (1277/1277), 143.11 KiB | 0 bytes/s, done.
Total 1277 (delta 793), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.6
remote: -----> Installing dependencies using bundler 1.13.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: The git source `git://github.com/radar/searcher.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote: You have added to the Gemfile:
remote: * source: git://github.com/radar/searcher.git (at master)
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/radar/searcher.git (at [email protected])
remote: Bundler Output: The git source `git://github.com/radar/searcher.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: You have added to the Gemfile:
remote: * source: git://github.com/radar/searcher.git (at master)
remote:
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/radar/searcher.git (at [email protected])
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to glacial-beyond-39560.
remote:
To https://git.heroku.com/glacial-beyond-39560.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/glacial-beyond-39560.git'
然后我尝试在Gemfile中来调整放只是gem "searcher"
,我必须尝试时捆绑的错误:
Bundler could not find compatible versions for gem "activerecord":
In snapshot (Gemfile.lock):
activerecord (= 4.2.1)
In Gemfile:
rails (= 4.2.1) was resolved to 4.2.1, which depends on
activerecord (= 4.2.1)
searcher was resolved to 0.0.1, which depends on
activerecord (~> 3.0.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
我看到它被推荐使用ActiveRecord 3x。我需要做什么(安装rails for active_record 3x的版本?或者我是厚的是这个宝石的安全协议的东西??任何人都可以帮我吗???
答
我想删除Gemfile.lock的内容,并运行捆绑重新安装一个已经为我工作
答
尝试了很多方法后,我有成功的改变:。
gem "searcher", github: "radar/searcher"
此:
gem "searcher", git: "https://github.com/radar/searcher.git"
我尝试做了很多的蒂姆ES和什么也没有,我认为这是在生产模式下的安全SSH或活动记录的版本。我需要安装使用activerecord 3x的最佳版本的导轨?我已经安装了活动记录3.2.22.5的版本。谢谢Sunny! – rld