{"action":"created","issue":{"url":"https://api.github.com/repos/postmodern/chruby/issues/333","labels_url":"https://api.github.com/repos/postmodern/chruby/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/postmodern/chruby/issues/333/comments","events_url":"https://api.github.com/repos/postmodern/chruby/issues/333/events","html_url":"https://github.com/postmodern/chruby/issues/333","id":67217987,"number":333,"title":"Could not find bundler","user":{"login":"jlove4m","id":8093809,"avatar_url":"https://avatars.githubusercontent.com/u/8093809?v=3","gravatar_id":"","url":"https://api.github.com/users/jlove4m","html_url":"https://github.com/jlove4m","followers_url":"https://api.github.com/users/jlove4m/followers","following_url":"https://api.github.com/users/jlove4m/following{/other_user}","gists_url":"https://api.github.com/users/jlove4m/gists{/gist_id}","starred_url":"https://api.github.com/users/jlove4m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlove4m/subscriptions","organizations_url":"https://api.github.com/users/jlove4m/orgs","repos_url":"https://api.github.com/users/jlove4m/repos","events_url":"https://api.github.com/users/jlove4m/events{/privacy}","received_events_url":"https://api.github.com/users/jlove4m/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-08T20:55:11Z","updated_at":"2015-06-20T23:25:19Z","closed_at":null,"body":"Hello!\r\n\r\nWe're using chruby and ruby install. Installing to /opt/rubies.\r\n\r\nI have two versions of ruby installed on this system:\r\n\r\n```\r\njenkins@Jenkins:~$ chruby\r\n    ruby-1.9.3-p547\r\n * ruby-2.2.1\r\n```\r\n\r\nHowever, when I run 'bundle install' from a directory, I get the following:\r\n\r\n```\r\njenkins@Jenkins:~/jobs/myapp-test/workspace$ ruby -v\r\nruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]\r\n\r\njenkins@Jenkins:~/jobs/myapp-test/workspace$ env | egrep -i 'gem|ruby'\r\nGEM_HOME=/var/lib/jenkins/.gem/ruby/2.2.1\r\nPATH=/var/lib/jenkins/.gem/ruby/2.2.1/bin:/opt/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/bin:/opt/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games\r\nRUBY_ENGINE=ruby\r\nGEM_ROOT=/opt/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0\r\nGEM_PATH=/var/lib/jenkins/.gem/ruby/2.2.1:/opt/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0\r\nRUBY_ROOT=/opt/rubies/ruby-2.2.1\r\nRUBYOPT=\r\nRUBY_VERSION=2.2.1\r\n\r\njenkins@Jenkins:~/jobs/myapp-test/workspace$ bundle install\r\n/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [] (Gem::LoadError)\r\n\tfrom /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'\r\n\tfrom /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'\r\n\tfrom /usr/local/bin/bundle:22:in `<main>'\r\n```\r\n\r\nI've made sure to install rubies and gems like so:\r\n\r\n```\r\nruby-install -i /opt/rubies/ruby-#{ruby_version} ruby #{ruby_version}\r\ncd /opt/rubies/ruby-#{ruby_version}/bin/ && sudo ./gem install #{gem} -v '#{version}'\r\n```\r\n\r\nThis always worked for us in the past, but not sure why we're having this issue on this new box.\r\nUbuntu 14.04 Server.\r\n\r\nThe jenkins user does not have a .gemrc file, there isnt an /etc/gemrc file.\r\n\r\nI do have chruby.sh linked in /etc/profile.d though.\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/postmodern/chruby/issues/comments/113839159","html_url":"https://github.com/postmodern/chruby/issues/333#issuecomment-113839159","issue_url":"https://api.github.com/repos/postmodern/chruby/issues/333","id":113839159,"user":{"login":"postmodern","id":12671,"avatar_url":"https://avatars.githubusercontent.com/u/12671?v=3","gravatar_id":"","url":"https://api.github.com/users/postmodern","html_url":"https://github.com/postmodern","followers_url":"https://api.github.com/users/postmodern/followers","following_url":"https://api.github.com/users/postmodern/following{/other_user}","gists_url":"https://api.github.com/users/postmodern/gists{/gist_id}","starred_url":"https://api.github.com/users/postmodern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmodern/subscriptions","organizations_url":"https://api.github.com/users/postmodern/orgs","repos_url":"https://api.github.com/users/postmodern/repos","events_url":"https://api.github.com/users/postmodern/events{/privacy}","received_events_url":"https://api.github.com/users/postmodern/received_events","type":"User","site_admin":false},"created_at":"2015-06-20T23:25:19Z","updated_at":"2015-06-20T23:25:19Z","body":"Did you make sure bundler was installed when using ruby-2.2.1? I'm also curious how ruby-1.9.3 is being loaded for the debug script?"}}