views:

41

answers:

2

As shown in a blog I followed the instructions of setting up SQLite3 on my Windows, but after I pasted the necessary files in Bin folder of Ruby, which I downloaded from http://www.sqlite.org/download.html, I get the following error when I use the following commmands:

C:\gem install sqlite3-ruby --version=1.2.3

ERROR:  http://rubygems.org does not appear to be a repository
ERROR:  Could not find a valid gem 'sqlite3-ruby' (= 1.2.3) in any repository

Please help me out with this problem and suggest me alternate methods for gem installing SQLite3. Thanks.

A: 

Try doing this: gem install sqlite3-ruby --version=1.2.3 --source http://gemcutter.org If that does not work head over to http://gemcutter.org and download the particular version of the gem file, go to the destination to where you copied it to in the command line and install it locally using gem install sqlite3-ruby -l

Shripad K
I recieve the following error with your first answer:ERROR: While executing gem ... (OptionParser::MissingArgument) missing argument: --source
Cody
Also, with your second answer it shows following error:ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: -1
Cody
Then try the second option. It might also be because you are on a windows build.
Shripad K
Have you installed ruby and rubygems properly? Do a gem update.
Shripad K
A: 

Check that you have the latest version of rubygems: gem -v executed in a command prompt should return 1.3.7. If it does not, you have several options (also explained on rubygems.org):

gem update --system

or

gem install rubygems-update
update_rubygems

Secondly, if you have the correct version and you are on a network with a proxy, you have to tell gem to use that proxy. There are two ways to do that. First, you could do

gem install sqlite3-ruby -p http://yourproxyserver:port` 

or you could define an environment variable

set HTTP_PROXY=http://yourproxyserver:port

and then this setting is saved (and you do not have to specify it explicitly anymore).

Hope this helps.

nathanvda