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

Trouble Installing Gem

Hi,

When trying to install the 'state-machine' gem, I get this error: 'Could not find gem 'state-machine (>= 0) ruby' in the gems available on this machine.' This is my gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.12'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'state-machine'
gem 'devise'
gem 'simple_form'

group :test do
    gem 'shoulda'
end 

group :development, :test do
    gem 'sqlite3'
end

#group :production do
#   gem 'pg'
#end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

Any ideas?

Thanks,

Adam

1 Answer

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

The first thing I see is your test stuff is set up funny. It should look more like this (if you're doing what I think you're doing - maybe you're not that far yet):

group :test do gem 'rspec-rails' gem 'shoulda-matchers' end

A quick Google search also shows me "state_machine" (with an underscore rather than - ). Again, I'm not sure where you're at precisely.

Failing those working, my question to you is: why the machine and not just straight onto your computer?