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 trialMichael Navarro
946 PointsAfter 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.
9 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsMichael, 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.
Michael Navarro
946 Pointsthis solved the problem :) thanks
Jason Seifer
Treehouse Guest TeacherHey 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?
Jason Seifer
Treehouse Guest TeacherHey Michael Navarro are you using the treehouse vm?
Michael Navarro
946 PointsNo 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....
Michael Navarro
946 PointsNo 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....
Michael Navarro
946 PointsHere 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
Adam Sackfield
Courses Plus Student 19,663 PointsCould 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
Michael Navarro
946 Pointshere's the github page for the project:
Adam Sackfield
Courses Plus Student 19,663 PointsWicked! It's dinner time for me now, but I will look into shortly and get back to you.
Michael Navarro
946 Pointswhenever 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.
Adam Sackfield
Courses Plus Student 19,663 PointsI 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.
Michael Navarro
946 PointsYeah, 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...
Adam Sackfield
Courses Plus Student 19,663 PointsI 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.
Dino Paškvan
Courses Plus Student 44,108 PointsAdam 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.
Adam Sackfield
Courses Plus Student 19,663 PointsValid 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
Michael Navarro
946 PointsAdam Sackfield Thanks for the help. Looks like using the older version of ruby and using the 32bit solved the problem :)
Adam Sackfield
Courses Plus Student 19,663 PointsGreat news! Think Dino Paškvan should get the best answer for this :)
Adam Sackfield
Courses Plus Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsCould you copy your gemfile into here for me to have a look please.
Thanks