issues with gem path with travis ci and ruby 1.8.7 - ruby

I am using travis for the first time and am trying to understand why my bundle installed gems are not available with ruby 1.8.7
Gemfile
source 'https://rubygems.org'
gem 'rspec'
.travis.yml
language: ruby
script: bundle exec rspec
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
travis output
$ rvm use 1.8.7 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ree-1.8.7-2012.02
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 1.8.7 (2013-06-27 MBARI 8/0x6770 on patchlevel 374) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
$ rvm --version
rvm 1.25.20 (version) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]
$ gem --version
2.0.14
$ bundle --version
Bundler version 1.6.1
$ bundle install --deployment
Fetching gem metadata from https://rubygems.org/...
Fetching additional metadata from https://rubygems.org/..
Installing diff-lcs 1.2.5
Installing rspec-core 2.14.8
Installing rspec-expectations 2.14.5
Installing rspec-mocks 2.14.6
Installing rspec 2.14.1
Using bundler 1.6.1
Your bundle is complete!
It was installed into ./vendor/bundle
$ bundle exec rspec
Could not find diff-lcs-1.2.5 in any of the sources
Run `bundle install` to install missing gems.

Based on other references, the suggested .yml file would be:
language: ruby
script: "bundle exec rspec"
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
Refer to: https://coderwall.com/p/x8exja

Looks like a bug in Travis-ci: https://github.com/travis-ci/travis-ci/issues/2253
There appears to be a workaround, but it haven't tried it.

Related

Unable to install bundler with gem

I am using ruby 2.6.5 and I try to install bundler -v 2.2.27 gem according to documentation using this command:
gem install bundler -v 2.2.27 --default
And this is the output I get:
gem install bundler -v 2.2.27 --default
Successfully installed bundler-2.2.27 as a default gem
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory # dir_chdir - /Users/jedrek/.rvm/gems/ruby-2.6.5/specifications/gems/bundler-2.2.27
It says it installed the gem but errors out at the same time :)
When I check current version of bundler I get this output
gem info bundler
*** LOCAL GEMS ***
bundler (2.2.32, 2.2.27, 2.2.24, 2.1.4)
Authors: André Arko, Samuel Giddins, Colby Swandale, Hiroshi
Shibata, David Rodríguez, Grey Baker, Stephanie Morillo, Chris
Morris, James Wen, Tim Moore, André Medeiros, Jessica Lynn Suttles,
Terence Lee, Carl Lerche, Yehuda Katz
Homepage: https://bundler.io
License: MIT
Installed at (2.2.32): /Users/jedrek/.rvm/gems/ruby-2.6.5
(2.2.27, default): /Users/jedrek/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
(2.2.24): /Users/jedrek/.rvm/gems/ruby-2.6.5
(2.1.4): /Users/jedrek/.rvm/gems/ruby-2.6.5
As you can see it says that bundler -v 2.2.27 is installed.
When I try to install dependencies in my project I get this error:
bundle install
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 2.2.27)
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 2.2.27)' in any of the relevant sources:
the local ruby installation
Listing current bundler version locally shows this output
gem list bundler
*** LOCAL GEMS ***
bundler (2.2.32, default: 2.2.27, 2.2.24, 2.1.4)
bundler-audit (0.7.0.1, 0.6.1)
capistrano-bundler (2.0.1, 1.3.0)
I am so confused. Is this is a bug?
I am using rubygems 3.2.27
gem --version
3.2.27
UPDATE
I tried upgrading rubygems to 3.2.32 and have the same issue.

Error ruby version When i'm running bundle install in Jekyll

I have reinstalled and updated my Ubuntu to 16.04, so now i have installed RVM for use Jekyll, but i have a problem when run bundle install of gemfile.
$ bundle install
Ignoring executable-hooks-1.3.2 because its extensions are not built.
Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Your Ruby version is 2.3.1, but your Gemfile specified 2.2.0
$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
$ rvm gemset list
gemsets for ruby-2.2.0 (found in /home/kedinn/.rvm/gems/ruby-2.2.0)
No running because this 2.3.1, but your Gemfile specified 2.2.0 why? if i have using ruby-2.2.0
It looks like you have both RVM and rbenv installed, and they are probably in conflict. Since they do more or less the same things, it should be safe to get rid of one of them. It means the rbenv installation of ruby is broken.
sudo rm -rf ~/.rbenv
Try installing Ruby like this

Cannot find gem after bundle install

I'm trying to setup my environment to do development on Travis CI's dpl project.
I installed rbenv to manage my Ruby versions and I use Ruby 2.2.3.
Then I do bundle install and the gems are installed.
Then when I try to do bundle exec rake I get this error:
Could not find CFPropertyList-2.2.8 in any of the sources
Run `bundle install` to install missing gems.
This gem is installed. Can you tell me why it is not found by Bundler?
Here is a gist of the output of my commands: https://gist.github.com/cotsog/7bb87c84a636bcd3de65
Thanks for your help!
Update:
Additional info about my environment:
$ which ruby
/Users/me/.rbenv/shims/ruby
$ which bundler
/usr/bin/bundler
$ ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
$ bundler --version
Bundler version 1.10.6

Using Bundler, RVM and RubyGems

I seem to be getting an odd issue here, not sure where to look to debug it. I have had Ruby installed on my machine for a while now but today have added RVM. So I will run through the steps I am taking:
My Gemfile:
source 'https://rubygems.org'
gem 'capistrano', '~> 3.1.0'
Try to install:
$ bundle
Fetching gem metadata from https://rubygems.org/.......
Installing rake (10.2.1)
Gem::InstallError: rake requires Ruby version >= 1.9.
An error occured while installing rake (10.2.1), and Bundler cannot continue.
Make sure that `gem install rake -v '10.2.1'` succeeds before bundling.
Check Ruby version, which is greater than 1.9:
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Make sure rake is installed:
$ gem list
*** LOCAL GEMS ***
...
rake (10.2.1)
...
Try installing rake anyway:
$ sudo gem install rake -v '10.2.1'
Successfully installed rake-10.2.1
Parsing documentation for rake-10.2.1
1 gem installed
Make sure rake is installed:
$ gem list
*** LOCAL GEMS ***
...
rake (10.2.1)
...
Try again:
$ bundle
Fetching gem metadata from https://rubygems.org/.......
Installing rake (10.2.1)
Gem::InstallError: rake requires Ruby version >= 1.9.
An error occured while installing rake (10.2.1), and Bundler cannot continue.
Make sure that `gem install rake -v '10.2.1'` succeeds before bundling.
Perhaps some useful information:
$ rvm info
system:
system:
uname: "Darwin ians-MacBook-Pro.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64"
system: "osx/10.9/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)"
zsh: "/bin/zsh => zsh 5.0.2 (x86_64-apple-darwin13.0)"
rvm:
version: "rvm 1.25.22 (stable) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]"
updated: "3 hours 34 minutes 31 seconds ago"
path: "/Users/ianjamieson/.rvm"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: "/usr/bin/rake"
environment:
PATH: "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Applications/android-developer-tools/sdk/platform-tools:/Applications/android-developer-tools/sdk/tools:/usr/lib/apache-ant-1.9.2/bin:/usr/local/mysql/bin:/Applications/android-developer-tools/sdk/platform-tools:/Applications/android-developer-tools/sdk/tools::/usr/lib/apache-ant-1.9.2/bin:/usr/local/mysql/bin:/Users/ianjamieson/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
Thanks.
The fix for me was:
$ rvm reinstall 2.1.1
It seems as though, when I installed this version the first time round it didn't complete correctly and didn't update all the paths. So gem install was installing my gems in the wrong place.

Error installing ScrAPI gem: ffi requires Ruby version >= 1.9.2

I am having issues installing the ScrAPI gem:
ERROR: Error installing scrapi:
ffi requires Ruby version >= 1.9.2.
I am running RVM and if I do ruby -v I get:
ruby -v
ruby 1.9.2p110 (2010-12-20 revision 30269) [i686-linux]
I am guessing you did
$ sudo gem install scrapi
sudo ruby -v
Unless you followed Wayne's sudo RVM install I'm guessing root uses a different ruby.

Resources