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

SQlite3

I am trying to get Ruby and Rails up and running. When I try to connect to the server with:

bundle exec rails server

I get a load error message stating the sqlite3 cannot be located. I am working off of windows 8.1. Do anyone have any advice. I've tried this from stackoverflow and it didn't work.

Is that file (/sqlite3/sqlite3_native) in your PATH environment variable? It will need to be in order for that gem to work. If you need to check try using echo %PATH% on the command prompt. If it ends up that you need to add it to your path you can either SET PATH=%PATH%;C:\Path\To\Sqlite3

Roger Nordqvist
Roger Nordqvist
7,007 Points

Have you downloaded SQlite3 from the homepage? It is not installed with rails, just the ruby libs to talk to SQlite3. You will find precompiled versions for windows on the homepage.

You need to download SQLite3 and add it to your path.

i will give that a try. Thanks.

2 Answers

I've downloaded the SQlite3 and added it to my Path. When I run echo %PATH% the SQlite3 appears in the path. When I run: bundle exec rails server, I get the same load error message. However, if I run: sqlite3.exe from my command line it seems to start, but I can't run any other commands. Ultimately, I still cannot connect to the rails server so I can move forward. Is there a particular place I need to store this file?

Roger Nordqvist
Roger Nordqvist
7,007 Points

It should not matter where you store the sqlite exe and dll. You could place them in C:\sqlite3 for example. As long as the directory is represented in your path.

have you also added the sqlite dll file?

try reinstalling the sqlite gem

I just deleted ruby and will try again from the beginning. This as been a week long road so a lot of files have been moved around. I've been all over stackoverflow. I will put the dll and exe files in the C:sqlite3 and add that to the path.

Roger Nordqvist
Roger Nordqvist
7,007 Points

I wish you good luck and I will check back to see how it goes. I've done it myself so hopefully we will be able to solve this together ;)