# Problem with running rake db:migrate on a Rails app

**URL:** <https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995>\
**Category:** Rails\
**Created:** [February 21, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995 "2009-02-21T23:13:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [February 21, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995/1 "2009-02-21T23:13:55Z")

</div>

Hi everybody,

I am trying to get the Typo blog engine up and running in development  
mode but I hit the wall as early as running rake db:migrate:

(in /home/tweisser/workspace/typo/typo)  
rake aborted!  
no such file to load – spec/rake/spectask  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:31:in `gem_original_require' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in`require’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/  
activesupport-2.2.2/lib/active\_support/dependencies.rb:153:in  
`require' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ activesupport-2.2.2/lib/active_support/dependencies.rb:521:in`new\_constants\_in’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/  
activesupport-2.2.2/lib/active\_support/dependencies.rb:153:in  
`require' /home/tweisser/workspace/typo/typo/lib/tasks/rspec.rake:9 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ activesupport-2.2.2/lib/active_support/dependencies.rb:142:in`load\_without\_new\_constant\_marking’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/  
activesupport-2.2.2/lib/active\_support/dependencies.rb:142:in `load' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ activesupport-2.2.2/lib/active_support/dependencies.rb:521:in`new\_constants\_in’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/  
activesupport-2.2.2/lib/active\_support/dependencies.rb:142:in `load' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rails-2.2.2/ lib/tasks/rails.rb:8 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rails-2.2.2/ lib/tasks/rails.rb:8:in`each’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rails-2.2.2/  
lib/tasks/rails.rb:8  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:31:in `gem_original_require' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in`require’  
/home/tweisser/workspace/typo/typo/Rakefile:10  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/  
lib/rake.rb:2349:in `load' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/ lib/rake.rb:2349:in`raw\_load\_rakefile’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/  
lib/rake.rb:1985:in `load_rakefile' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/ lib/rake.rb:2036:in`standard\_exception\_handling’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/  
lib/rake.rb:1984:in `load_rakefile' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/ lib/rake.rb:1969:in`run’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/  
lib/rake.rb:2036:in `standard_exception_handling' /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/ lib/rake.rb:1967:in`run’  
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/  
bin/rake:31  
/opt/ruby-enterprise/bin/rake:19:in `load’  
/opt/ruby-enterprise/bin/rake:19

You can see which version of Ruby I’m running. It’s symlinked by /opt/  
ruby-enterprise with /opt/ruby-enterprise/bin in my $PATH.

I have the latest version of gem and these gems installed:

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.2.2)  
actionpack (2.2.2)  
actionwebservice (1.2.6)  
activerecord (2.2.2)  
activeresource (2.2.2)  
activesupport (2.2.2)  
capistrano (2.5.4)  
highline (1.5.0)  
mysql (2.7)  
net-scp (1.0.2)  
net-sftp (2.0.2)  
net-ssh (2.0.10)  
net-ssh-gateway (1.0.1)  
rails (2.2.2)  
rake (0.8.3)  
rspec (1.1.12)  
will\_paginate (2.2.2)

I don’t know what’s wrong here.

Did anybody encounter this problem elsewhere? I have little to no  
Rails debugging experience with current Rails versions. Where to  
start?

Thanks for your help.

Tobias

---

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [February 22, 2009, 4:47am UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995/2 "2009-02-22T04:47:36Z")

</div>

Rake is trying to find rspec and isn`t being able to do it. Do you  
have any other rails version available? Are you sure that the rspec  
gem is installed at your current Ruby interpreter?

You could also try to unpack the rspec gem into vendor/gems in your app.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)

---

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [February 22, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995/3 "2009-02-22T13:39:37Z")

</div>

It’s a weird problem.

rspec is installed for sure. I can use it in other Rails apps locally  
from within the same Ruby/Rails setup.

I tried adding a git submodule for rspec to vendor/gems/rspec from the  
rspec github page. Still, the same errors.

I switched back to Ubuntu’s Ruby installation to try if this made a  
difference, but the problem remains the same. It just affects Typo.  
Other Rails apps work fine…

Thanks for your help,

Tobias

On Feb 22, 4:46 am, Maurício Linhares [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [February 23, 2009, 1:00am UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995/4 "2009-02-23T01:00:52Z")

</div>

I’d recommend that you take a look at this:

[http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems](http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems)

It should help you get rspec working.

–Matt J.

---

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [April 18, 2009, 5:00am UTC](https://www.ruby-forum.com/t/problem-with-running-rake-db-migrate-on-a-rails-app/160995/5 "2009-04-18T05:00:20Z")

</div>

Your local gem is REE’s gem repository or MRI’s? Thats easy to be  
confused indeed… and seems when I tried something like rake  
gems:install in rails project it would always install the gem inside  
MRI unless you have replace the static link of rake/gem/ruby. (Yep, I  
am explicitly calling the rake inside REE.)
