Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChristian McMullin
13,086 PointsError in Gemfile
when trying to install bundle i get this in the terminal
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:89:in parse': Illformed requirement ["~2.1.0"] (Gem::Requirement::BadRequirementError)
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:119:in
block in initialize'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:119:in map!'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:119:in
initialize'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:56:in new'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/requirement.rb:56:in
create'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/dependency.rb:58:in initialize'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dependency.rb:43:in
initialize'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:74:in new'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:74:in
gem'
/Users/user/Desktop/Everything/Ruby/Treehouse Lessons/odot/Gemfile:24:in block in eval_gemfile'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:157:in
group'
/Users/user/Desktop/Everything/Ruby/Treehouse Lessons/odot/Gemfile:23:in eval_gemfile'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:32:in
instance_eval'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:32:in eval_gemfile'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/dsl.rb:10:in
evaluate'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/definition.rb:25:in build'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler.rb:155:in
definition'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/cli/install.rb:77:in run'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/cli.rb:145:in
install'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/command.rb:27:in run'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/invocation.rb:121:in
invoke_command'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/vendor/thor.rb:363:in dispatch'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/base.rb:440:in
start'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/cli.rb:9:in start'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/bin/bundle:20:in
block in <top (required)>'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/friendly_errors.rb:5:in with_friendly_errors'
/Users/user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/bin/bundle:18:in
<top (required)>'
/Users/user/.rbenv/versions/2.2.0/bin/bundle:23:in load'
/Users/user/.rbenv/versions/2.2.0/bin/bundle:23:in
<main>'
There was an error in your Gemfile, and Bundler cannot continue.
2 Answers
Maciej Czuchnowski
36,441 PointsIt would be helpful to see how your gemfile looks like. My best guess is you wrote "~2.1.0" somewhere in the Gemfile and it should be "~> 2.1.0" instead.
Cheryl Jones
13,405 PointsYay! Thanks so much. I had the same problem and wanted to bang my head against the wall. You saved me a big bruise. Cheers!
Christian McMullin
13,086 PointsChristian McMullin
13,086 PointsYou were totally right.