Installation issue with ruby on rails/sqlite3..

Folks,

I just used rails installer to install ruby on rails on my windows 8 machine. I was happy to see that my installation went through without any issue. As most of you know, it creates a dummy rails app on installation, todo app. I thought of running this before jumping into something else.

So, I did "bundle install" and then "rails s" to run server, it went well until I typed "localhost:3000" in my browser. Message I got in console was :

ERROR LoadError: Please install the sqlite3 adapter: 'gem install ativerecord-dqlite-adapter' <sqlite3 is not part of the bundle. Add it to Gemfile.>

I needed to update the certificates(.pem file) to install sqlite3(Thanks to ruby-forum for helping me on this as well). Now, I can see that even sqlite3 is also installed on my machine.

Doing "bundle show sqlite3" gives : C:/Rails Installer/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.8-x86-mingw32

Fair enough. So, I should be able to run server now. Right?

Surprisingly, "rails s" is giving me another error message now. Message is : C:/Rails Installer/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.8-x86-mingw32/lib/sqlite3.rb: in 'require' : cannot load such file -- sqlite3/sqlite3_native<LoadError> from ... ....

I would appreciate if someone can help me to fix this quickly. Cheers!

Hemant, Have a look at this, http://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails

Regards

Hi Sushruth,

That's nice. I can see that problem going away now. But again, I find myself hitting another error now. I do not understand why installation is such a pain. Should't it be pretty straightforward?

Anyway, message I get is:

ERROR LoadError : Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` <cannot load such file -- sqlite>

Doing "gem install activerecord-sqlite3-adapter" gives

ERROR: Could not find a valid gem 'activerecord-sqlite3-adapter'.

Any idea?

Hemant,

Follow this link, http://stackoverflow.com/questions/15480381/how-do-i-install-sqlite3-for-ruby-on-windows

All your questions should be covered.

If you have more doubts, may i suggest the #rubyonrails IRC where it might be easier for people to help you out.

Regards,

Sushruth

It is often problematic on Windows. Better in my opinion to use a linux variety such as ubuntu or use a Mac. You can run Ubuntu in a virtual machine on windows or dual boot your pc windows/ubuntu. Then you will find Rails much more straightforward I believe.

Colin

Follow this link,

Sushruth, Naah it did not help. Thanks for your prompt reply though.

I am still with the same problem of

ERROR LoadError : Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` <cannot load such file -- sqlite>

As I said earlier, I have the sqlite3 gem installed in my machine. Doing "bundle show sqlite3" gives : C:/Rails Installer/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.8-x86-mingw32

I wonder which adapter is it talking about..