Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Fernando Ramos
Fernando Ramos
4,369 Points

Ruby on Rails install error during "gem install sqlite3" command

I had an error when I ran the "D:\gem install sqlite3" command per the lesson "Installing Ruby on Rails" ... I am using Windows 8.1 and downloaded the Ruby Installer rubyinstaller-2.1.3-x64.exe and the Ruby DevKit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe. Everything went well until I got "ERROR: Failed to build gem native extensions" message... it had a lot of other stuff on this message and I have a snapshot to send you when you reply to this email.

I cannot go further since this SQLite3 error is causing Rails to fail on the "testapp" portion and I cannot successfully run the "bundle exec rails server" command due to this error in SQLite3 from above.

3 Answers

David Rynn
David Rynn
10,554 Points

I had the same issue then went through the Windows 8 control panel to uninstall Ruby and all associated installers (I may have had a couple of ruby and rails installations from before). Then I re-installed using Ruby v. 1.9.3. Here's the link: http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p545.exe?direct

and then I used the associated devkit. Link:

https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe

Then I carefully followed the directions for the rest of the video. Everything worked for me. Some of the installations pause for a minute or two while they're doing their thing, so be patient.

Hope this helps.

Fernando Ramos
Fernando Ramos
4,369 Points

Thanks David! Fortunately it appears to be working for me but I don't have SQLite3 on it. So I will try your recommendations. But I did install the Treehouse VM from the "Installing a Ruby Development environment" Section and that seems to work fine. Thank you so much for the advice and the links!

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Fernando Ramos did you install the 64 bit version of both Ruby and the dev kit? I suggesting trying to reinstall both and give it another shot. If you're still having trouble, try proceeding by using the Treehouse VM which contains sqlite and everything else you need to get started.

Fernando Ramos
Fernando Ramos
4,369 Points

Jason, yes I started with the 64-bit files first. I was very careful with that, and then uninstalled these to try the 32-bit files, which I read on the Internet was an option I could do if I have a 64-bit PC. But I got the same error doing the 32-bit files too. I played around all day long yesterday and finally gave up hoping to get some help.

I didn't even go on to the Treehouse VM video because since I could not finish the Ruby install lessons, I figured it'd be pointless to try doing the VM video if I didn't have the SQLite3 stuff installed. You might consider putting that tidbit of info in the teachers notes so any students like me with the same issues will see that additional help could be gained from the Treehouse VM video (if SQLite3 "gem install sqlite3" command gives them the troubles I experienced) and to proceed if they get stuck.

I will let you know how that goes. I do appreciate you getting back to me!

Fernando Ramos
Fernando Ramos
4,369 Points

The site given at the vm.teamtreehouse.com video lesson ("Installing the Treehouse VM on Windows", time position 3:35 minutes) by Jason Seifer, does not look the same as the one that I get when I go to vm.teamtreehouse.com . The one I get has a drop down menu but nowhere is the "treehouse-vm.zip" that Jason mentions in the video. Instead I get the drop down menus with 7 options: 1-User Authentication with Rails, 2-Build a Todo list with Rails 4, 3-Upgrading a Ruby on Rails Application, 4-Rails Layout and CSS Frameworks, 5-Build a Simple Ruby on Rails Application, 6-Building Social Features in Ruby on Rails, 7-Advanced Social Features in Ruby on Rails.

So which one or what do I pick to complete the Treehouse VM lesson if the "treehouse.vm.zip" is not listed? And how do I continue following the video for the zip file mentioned in the video if it is not there to install exactly like the video instructs to follow along? At a stand still again and a little frustrated :-((

Grice Mulligan
Grice Mulligan
3,378 Points

I encountered the same issue described by Fernando Ramos above. After numerous attempts to resolve the situation--including 4 fresh installs, none of which succeeded--I've completed the sqlite3 install for Ruby on Rails on Windows 7 by following the step-by-step instructions found here: http://rubyonwindowsguides.github.io/book/ch02-05.html

Starting from the error described by Fernando Ramos above, it took me a bit over an hour to complete the steps in the instructions in the link provided.