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

After I run "rails generate rspec:install" i get an error

Followed the instructions exactly. But whenever i do

rails generate rspec:install

i get this as a response. Why is this happening. I have been trying to figure this out for over an hour :/

Could not find gem 'capybara (~> 2.1.0) x64-mingw32' in the gems available on this machine. Run `bundle install` to install missing gems.

Could you copy your gemfile into here for me to have a look please.

Thanks

9 Answers

Michael, you're getting an error here because the capybara gem depends on nokogiri which isn't compatible with 64-bit version of Ruby on Windows. I just tested this and I got the same errors you get with the 64-bit install. When I removed that and switched to the 32-bit version, all these errors went away.

this solved the problem :) thanks

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Michael Navarro I recommend using the VM if you're having trouble. What happens if you just do "gem install capybara" from the command prompt?

No Jason, I am using a windows machine, and command prompt. I'd like to use this because this is how I will be developing in the future....

No Jason, I am using a windows machine, and command prompt. I'd like to use this because this is how I will be developing in the future....

Here is my gemfile:

source 'https://rubygems.org'

gem 'rails', '4.0.4'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end

group :development, :test do
  gem 'rspec-rails', '~> 2.0'
end

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

Could you upload the project to github so I can clone it and figure out where it is going wrong. You could even try removing the version after capybara like below

    gem 'capybara'

then run bundle install again.

Then try rails g rspec:install

here's the github page for the project:

https://github.com/michaelnavarro/odot

Wicked! It's dinner time for me now, but I will look into shortly and get back to you.

whenever i try to do anything now i get this error:

Could not find gem 'capybara (>= 0) x64-mingw32' in the gems available on this machine. Run bundle install to install missing gems.

I just had a quick look and it's fine on my system. This is what I did.

Downloaded the odot-master

bundle

rails g rspec:install

And it installed successfully.

Try running bundle then the rspec command and let me know if sorted.

Screenshot

Yeah, I did that and I'm still getting the same error.... Someone in another thread suggested certain things do not work properly on windows machines unless you have the 32 bit ruby install? Should i just reinstall ruby in 32 bit? I was hoping i could run the 64 bit installation...

I would assume that is the case then. I am on 64 bit windows, but I generally stay clear of the 64 bit versions as support is not as good as 32 bit. Damn Windows, I need to get a Mac. Let me know how the fresh install goes.

Adam Sackfield I switched to a Mac years ago, while I was still developing PHP. I got tired of running Apache in VMs or restarting into Linux, just to restart back into Windows to use Photoshop. I figured using OS X would get me the best of both worlds. I don't use PHP anymore and I don't use Photoshop either, but I'm so glad I'm using OS X.

I don't go for OS X vs Windows vs Linux arguments, they're usually pointless and tedious flamewars — each OS has its advantages, but when it comes to web development, I feel OS X best suits my workflow, regardless of what technologies I find myself using.

Valid points there. It just seems Mac's are the industry standard you only have to watch the audience in a conference and see 95% are on a mac. Best start saving as they are very expensive lol

Adam Sackfield Thanks for the help. Looks like using the older version of ruby and using the 32bit solved the problem :)

Great news! Think Dino Paškvan should get the best answer for this :)