Forum: Ruby no such file to load

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eduardo C. (Guest)
on 2009-03-25 03:53
Hi,

I cannot get my ruby application to run :( ... This is what's appening
when I run rake db:migrate:


macminicasa:kshema910 macmini$ rake db:migrate
(in /Users/macmini/.Trash/kshema910)
rake aborted!
no such file to load -- test/unit/error
/Users/macmini/.Trash/kshema910/Rakefile:10:in `require'
(See full trace by running task with --trace)


And with trace:

macminicasa:kshema910 macmini$ rake --trace db:migrate
(in /Users/macmini/.Trash/kshema910)
rake aborted!
no such file to load -- test/unit/error
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`block in require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/deprecation.rb:224:in
`<top (required)>'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`block in require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support.rb:37:in
`<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/misc.rake:11:in
`require'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/misc.rake:11:in
`<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:4:in
`load'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:4:in
`block in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:4:in
`each'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:4:in
`<top (required)>'
/Users/macmini/.Trash/kshema910/Rakefile:10:in `require'
/Users/macmini/.Trash/kshema910/Rakefile:10:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2359:in
`load'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2359:in
`raw_load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1993:in
`block in load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1992:in
`load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1976:in
`block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/bin/rake:31:in `<top
(required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'

Here it is my gem list:
*** LOCAL GEMS ***

actionmailer (2.3.2, 2.2.2)
actionpack (2.3.2, 2.2.2)
activerecord (2.3.2, 2.2.2)
activeresource (2.3.2, 2.2.2)
activesupport (2.3.2, 2.2.2)
andand (1.3.1)
capistrano (2.5.5)
cgi_multipart_eof_fix (2.5.0)
configatron (2.2.2)
daemons (1.0.10)
fastthread (1.0.4)
fiveruns_tuneup (0.8.20)
gem_plugin (0.2.3)
giternal (0.0.2)
highline (1.5.0)
liquid (2.0.0)
mysqlplus (0.1.1)
net-scp (1.0.2)
net-sftp (2.0.2)
net-ssh (2.0.11)
net-ssh-gateway (1.0.1)
parseexcel (0.5.2)
rack (0.9.1)
rails (2.3.2, 2.2.2)
rake (0.8.4)
rspec (1.2.2)
rspec-rails (1.2.2)
rufus-scheduler (1.0.13)
ya2yaml (0.26)
yfactorial-utility_scopes (0.2.2)


What must I do?
Scott Lillibridge (Guest)
on 2009-03-25 04:02
(Received via mailing list)
sudo gem install test-unit.

Also, is there a reason you are developing in your .Trash folder?
Eduardo C. (Guest)
on 2009-03-25 04:13
Know this happening:

macminicasa:kshema910 macmini$ rake db:migrate
(in /Users/macmini/Desktop/kshema910)
rake aborted!
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: invalid
multibyte char (US-ASCII)
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: invalid
multibyte char (US-ASCII)
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: syntax
error, unexpected $end, expecting keyword_end
...e datos con toda la información mínima necesario"
...                               ^
/Users/macmini/Desktop/kshema910/Rakefile:10:in `require'
(See full trace by running task with --trace)

With Trace:

acminicasa:kshema910 macmini$ rake --trace  db:migrate
(in /Users/macmini/Desktop/kshema910)
rake aborted!
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: invalid
multibyte char (US-ASCII)
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: invalid
multibyte char (US-ASCII)
/Users/macmini/Desktop/kshema910/lib/tasks/initializer.rake:2: syntax
error, unexpected $end, expecting keyword_end
...e datos con toda la información mínima necesario"
...                               ^
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`block in load_with_new_constant_marking'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load_with_new_constant_marking'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in
`block in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in
`each'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in
`<top (required)>'
/Users/macmini/Desktop/kshema910/Rakefile:10:in `require'
/Users/macmini/Desktop/kshema910/Rakefile:10:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2359:in
`load'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2359:in
`raw_load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1993:in
`block in load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1992:in
`load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1976:in
`block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.4/bin/rake:31:in `<top
(required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'


And now what must i do?

Thanks
Vaggelis T. (Guest)
on 2009-03-28 16:11
Eduardo C. wrote:
                              ^
> 
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
> `load'
> 
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
> `block in load_with_new_constant_marking'
> 
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
> `new_constants_in'
> 
/Users/macmini/.gem/ruby/1.9.1/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
> `load_with_new_constant_marking'
> /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in
> `block in <top (required)>'
> /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in
> `each'
> /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/tasks/rails.rb:8:in

>

Rails version 2.2 is not supported in ruby 1.9. As i can see from your
gem list rails 2.3.2 is already installed, so try to cleanup your gem
list.
(root permissions required)
###
# gem clean
###
this should eliminate your old 2.2 rails version. Check your gem list
again and try again.
Pratik K. (Guest)
on 2010-10-23 19:31
This might help some, who are trying to install Rails3 using RVM and
Ruby 1.9.2
http://rvm.beginrescueend.com/packages/openssl/
This topic is locked and can not be replied to.