views:

2006

answers:

2

I am trying to learn rails3.

I tried folowing the installation guide from guides.rails.info, I installed

sudo gem install rake rack-test rack-mount erubis mail
sudo gem install tzinfo builder i18n memcache-client
sudo gem install text-format thor

And rails 3 via

sudo gem install rails --pre

Now I create a new app

rails abc

And try

rake db:create

Which fails with

Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the sources.

So I try installing sqlite3-ruby

sudo gem install sqlite3-ruby

Which fails with

Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

So I install it via apt-get

sudo aptitude install libsqlite3-ruby1.8.

And still get same error on rake db:create.

A: 

print mkmf.log here plz

Falcon
I dont know where this file should be, and it is not in current dir. I get this with rake db:create --trace though http://dpaste.de/Lf2E/
uswaretech
+5  A: 

This can be caused by a number of things. So I have a number of questions too. ;)

Is this Debian or Ubuntu? I'm going to assume Ubuntu.

I also assume, because you tried installing libsqlite3-ruby1.8, that you are also running Ruby 1.8? Do you have any other versions of Ruby installed? And what does ruby --version say?

Ubuntu versions it's Ruby packages as ruby1.8, ruby1.9.0, and ruby1.9.1. Look for those in your package manager. The package named just ruby is a dummy that depends on whatever is the default version for Ubuntu at that time.

When you start irb and do require 'sqlite3', what is the output?

As for the gem install not working, if you want to try that again, do you have the ruby-dev and libsqlite3-dev Ubuntu packages installed?

Shtééf
Ubuntu 9.10, and `ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]`
uswaretech
Thanks, installing ruby-dev seems to fix it.
uswaretech