First time trying to learn Ruby on Rails from the (it would seem now
badly out of date) Linda.com tutorials...
I was trying to rake db:migrate and received this error "/usr/bin/rake:
27:in `require': no such file to load -- rake (LoadError) from /usr/
bin/rake:27"
The tutorial assures me that there shouldn't be an error and if there
is that I shouldn't worry as I will only have to solve it once...
thank god I am reassured...
Any insight would be appreciated because I have googled and can find
anything that may be of assistance...
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Successfully installed rails-2.1.2
1 gem installed
Which was not exactly what I had expected at the time...
I have been poking around and it would seem that rake is not installed
at all... at least it is not in /usr/local/bin...
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Successfully installed rails-2.1.2
1 gem installed
Which was not exactly what I had expected at the time...
That's just telling you that the --include-dependencies option is now
the default option.
I have been poking around and it would seem that rake is not installed
at all... at least it is not in /usr/local/bin...
Well you have just tried the rails gem, not the rake one. Is rake
included in the list outputted by
gem list
?
Where is gem itself (ie what does which gem say?). In general
executable scripts installed by gem would end up in the same place.
OK I just did a gem install rake to see what would happen and got
WARNING: Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
/usr/local/bin aren't both writable.
WARNING: You don't have /home/gsv/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Successfully installed rake-0.8.3
1 gem installed
Installing ri documentation for rake-0.8.3...
Installing RDoc documentation for rake-0.8.3...
I'd guess that you've ended up with 2 installs of ruby: one in /usr,
and the other in /usr/local. the rake executable from /usr/bin is
trying to load the rake gem from the ruby install in /usr which fails
because you've installed the rake gem in your other ruby install (the
one in /usr/local). If that is true then removing rake from /usr/bin
might help - the shell will then find the one in /usr/local. You could
test this out by running /usr/local/bin/rake db:migrate instead of
rake db:migrate
I bit the bullet and trashed everything... then rebuilt the system...
but this time used the repositories and then upgrades where needed...
then made symbolic links to /usr/local/bin from usr/bin and vóila she
works...