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 trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Set up Git and Add Gems

MacKenzie T. Stout
MacKenzie T. Stout
23,972 Points

'bundle' command returns a parsing error

Command 'bundle' into rails application returns this error:

'[!] There was an error parsing 'Gemfile': You cannot specify the same gem twice with different version requirements. You specified: sdoc (~> 0.4.0) and sdoc (>= 0). BUndlr cannot continue.

from c:/Users/MacKenzie/Documents/Programming/Projects/odot/Gemfile:16

------------------------------------

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

gem 'tzinfo-data' platforms: [:mingw, :mswin, :x64_mingw, :jruby}

source 'https://rubygems.org'

-------------------------------------'

Do I need to reinstall a different version of a gem?

Seth Kroger
Seth Kroger
56,413 Points

Can you post your Gemfile? You can post code blocks/snippets by enclosing them with 3 backticks (the key to the left of the 1 on US keyboards) and blank lines before and after.

```

... code goes here ...

```

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

Note that you have sdoc twice here but you only need one of the two:

gem 'sdoc', '~> 0.4.0', group: :doc

group :doc do
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', require: false
end
MacKenzie T. Stout
MacKenzie T. Stout
23,972 Points

Thank you! I after reviewing the video I saw that the group :doc wasn't included and deleted that piece of code.

MacKenzie T. Stout
MacKenzie T. Stout
23,972 Points
source 'https://rubygems.org'


gem 'rails', '4.2.6'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

group :doc do
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', require: false
end

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'rspec-rails', '~> 2.0'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

group :test do
    gem 'capybara', '~> 2.1.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]