small medium large xlarge

Generic-user-small
27 Apr 2010, 15:58
Conor Nugent (3 posts)

Hi guys,

I guess I must be making a mess of things somewhere along the line in upgrading my system ( os x sl) but I am getting the an error when trying to apply the migration to the database

$ rake db:migrate
(in blah/depot)
rake aborted!
no such file to load -- bundler

(the full trace is at the end of this post)

Checking my system I have

$ rails --version 
Rails 3.0.0.beta3

$ gem --version 
1.3.6

$ rake --version 
rake, version 0.8.7

I did have an issue with installing sqlite3-ruby I presumed that this is where the issue is but looking at the output the issue seems to be limited to the documentation

$ sudo gem install sqlite3-ruby
Password:
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.2.5
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.5...

No definition for _wrap_new_CallbackData

...etc

Does anyone have any idea where I might have gone wrong?

$ rake --trace db:migrate
(in blah/depot)
rake aborted!
no such file to load -- bundler
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/conor/Documents/development/PlayProjects/rails3/depot/config/boot.rb:4
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/conor/Documents/development/PlayProjects/rails3/depot/config/application.rb:1
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/conor/Documents/development/PlayProjects/rails3/depot/Rakefile:4
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/conor/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Samr_small_pragsmall
27 Apr 2010, 13:30
Sam Ruby (634 posts)

Can I get you to try two things?

$ gem list -d bundler

*** LOCAL GEMS ***

bundler (0.9.3)
    Authors: Carl Lerche, Yehuda Katz
    Homepage: http://github.com/carlhuda/bundler
    Installed at: /var/lib/gems/1.8

    Bundles are fun
$ irb -rubygems
irb(main):001:0> require 'bundler'
=> true
Generic-user-small
27 Apr 2010, 16:03
Conor Nugent (3 posts)

Hi Sam,

Thanks for getting back to me so quickly

Here are the results

$ gem list -d bundler

*** LOCAL GEMS ***

bundler (0.9.24)
    Authors: Carl Lerche, Yehuda Katz, André Arko
    Rubyforge: http://rubyforge.org/projects/bundler
    Homepage: http://github.com/carlhuda/bundler
    Installed at: /opt/local/lib/ruby/gems/1.8

    The best way to manage your application's dependencies

and

$ irb -rubygems
irb(main):001:0> require 'bundler'
=> true

I presume that things should be working okay with bundler 0.9.24?

Samr_small_pragsmall
27 Apr 2010, 18:32
Sam Ruby (634 posts)

Nothing’s wrong with 0.9.24, I’ve tested with that version that myself.

You’ve clearly got bundler installed in a place where gem and irb can find it. You mention Snow Leopard, and I’ve seen problems with multiple versions of Ruby being installed and the setting of the PATH environment variable.

Can you follow the advice in that second link, and also try which irb and which rake?

Andre_bangs_square_pragsmall
27 Apr 2010, 21:17
Andre Arko (1 post)

Conor, if you’re still having trouble, please check the troubleshooting instructions at the bottom of the bundler README (http://github.com/carlhuda/bundler/blob/v0.9/README.md). If that doesn’t help, there are instructions there on the information needed to open a ticket on the issue tracker, and I can help you from there.

Generic-user-small
28 Apr 2010, 09:43
Conor Nugent (3 posts)

Problem solved! Following your instructions Sam I was able to find the problem

$ which ruby
/opt/local/bin/ruby
$ which gem 
/opt/local/bin/gem
$ which rake
/usr/bin/rake

The rake path was the culprit

Anyway I just reinstalled rake and I was all set to go

$ sudo gem install rake
$ which rake
/opt/local/bin/rake

Thanks Sam and Andre for your help, I really appreciate it. I know how frustrating trying to untangling my blunderings must be

Generic-user-small
23 Jun 2010, 17:16
Roberto Fuentes (6 posts)

I am having the same issue as Conor… I am working on a windows 7 machine. The error that I get is as follows:

depot>rake db:migrate
(in .../depot)
rake aborted!
no such file to load --sqlite3/sqlite3_native

This is the system I am working with:

Rails 2.3.8
gem 1.3.7
rake 0.8.7

During the execution of rake db:migrate a window pops-up twice that says:

bq. The procedure entry point sqlite3_column_database_name could not be located in the dynamic link library sqlite3.dll.

The following is the full –trace:

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2377:in `raw_load_rakefile'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2017:in `load_rakefile'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2068:in `standard_exception_handling'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2016:in `load_rakefile'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2000:in `run'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:2068:in `standard_exception_handling'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb
:1998:in `run'
C:/RAILS/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31

C:/RAILS/InstantRails-2.0-win/ruby/bin/rake:19:in `load'
C:/RAILS/InstantRails-2.0-win/ruby/bin/rake:19

Any help would be greatly appreciated! Thanks

Cimg0269_pragsmall
24 Jun 2010, 10:35
Seth Arnold (22 posts)

Roberto, I’m not sure your rake trace matches your sqlite3 problem – it just says it can’t find a @Rakefile@. I’m guessing a second run was done in the wrong directory?

As for the sqlite3 problem, do you have the @sqlite3.dll@ file installed in a place where the gem would find it? (please forgive me, it’s been years since I used Windows, last I knew, C:\windows\, C:\windows\system32\, and the program directory were the .. only? most popular? places to stuff DLLs.)

Can you run the windows-equivalent @nm@ or @grep@ command on your sqlite3.dll, and see if the function @sqlite3_column_database_name@ is there or not? According to http://www.sqlite.org/c3ref/column_database_name.html this symbol is only available if the library was compiled to support metadata queries. And rails will most definitely need that. :)

Generic-user-small
24 Jun 2010, 13:59
Roberto Fuentes (6 posts)

Seth, thanks for the input.

I reinstalled InstantRails. Following the same instructions in the book I now get this:

depot>rake --trace db:migrate
(in C:/.../depot)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
no such file to load -- sqlite3/sqlite3_native
C:/RAILS/IR/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_or
iginal_require'
C:/RAILS/IR/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `requir
e'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:156:in `require'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:521:in `new_constants_in'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:156:in `require'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.0-x86-mswin32-60/lib/sq
lite3.rb:6
C:/RAILS/IR/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_or
iginal_require'
C:/RAILS/IR/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `requir
e'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:156:in `require'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:521:in `new_constants_in'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/d
ependencies.rb:156:in `require'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/c
ore_ext/kernel/requires.rb:7:in `require_library_or_gem'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/c
ore_ext/kernel/reporting.rb:11:in `silence_warnings'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/c
ore_ext/kernel/requires.rb:5:in `require_library_or_gem'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/sqlite3_adapter.rb:10:in `sqlite3_connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:223:in `send'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:223:in `new_connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:188:in `checkout'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:184:in `loop'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:184:in `checkout'
C:/RAILS/IR/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:183:in `checkout'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:98:in `connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_specification.rb:123:in `retrieve_connectio
n'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/con
nection_adapters/abstract/connection_specification.rb:115:in `connection'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/mig
ration.rb:440:in `initialize'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/mig
ration.rb:401:in `new'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/mig
ration.rb:401:in `up'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/mig
ration.rb:383:in `migrate'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:112

C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_wi
th_call_chain'
C:/RAILS/IR/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_wi
th_call_chain'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_t
ask'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_leve
l'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_leve
l'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard
_exception_handling'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_leve
l'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard
_exception_handling'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/RAILS/IR/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/RAILS/IR/ruby/bin/rake:19:in `load'
C:/RAILS/IR/ruby/bin/rake:19

And I still get the pop-ups as mentioned in the previous post.
The sqlite3.dll is in @C:/RAILS/IR/ruby/bin@.

I’m having problems verifying the function @sqlite3_column_database_name@.

Samr_small_pragsmall
24 Jun 2010, 18:34
Sam Ruby (634 posts)

For a number of reasons, the 4th edition of this book no longer recommends the use of InstantRails. Instead it recommends RubyInstaller. After installing 1.8.7-249, download the command-line program for accessing and modifying SQLite databases and DLL of the SQLite library without the TCL bindings from sqlite3. Unzip the results and put the files you get into the C:\Ruby\bin directory. At that point, install the sqlite3-ruby and rails gems:

gem install sqlite3-ruby
gem install rails --pre

For edition 3, do not specify the --pre option on the last command.

Alex-crazyeyes_pragsmall
29 Jul 2010, 17:13
Alex Chaffee (1 post)

I just got the same error message and since this page is the #1 google hit for “rake aborted! no such file to load – bundler” I thought I’d share my solution.

My paths were fine but my Rakefile was loading another file that also required rubygems and bundler, and that file was failing. I guess maybe Bundler is not reentrant? My solution was to make the second require conditional, a la:

unless Object.const_defined?(:Bundler)
  require 'rubygems'
  require 'bundler'
end
Bundler.setup
225098_635664541547_54605104_34268131_7523289_n(2)_pragsmall
28 Feb 2011, 16:20
Josh Harris (1 post)

I have the same problem as the original post, when I run

@user$ which rake /usr/bin/rake@

How do I change the path to

@$ which rake /opt/local/bin/rake@

I read somewhere to change the .bash_profile to @export PATH=/opt/local/bin:$PATH@

Is that the only code I need or do I need to specify anything about the rake file itself? Sorry, I’m totally new to RoR development, and I’m trying to run my first @rake db:migrate@ Thanks to anyone willing to take the time to help.

You must be logged in to comment