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.
misiek (Guest)
on 2006-02-17 00:50
(Received via mailing list)
I need to load lib/geocoder

so I added to my controler
require 'lib/geocoder'

I am sure I got this file with 'lib/geocoder'

so what is going on ?




no such file to load -- lib/geocoder

RAILS_ROOT: /home/ftp/workspace/availablezone.com/public/../config/..
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require'
#{RAILS_ROOT}/app/controllers/geocode_controller.rb:4
routing.rb:234:in `traverse_to_controller'
generated/routing/recognition.rb:7:in `eval'
generated/routing/recognition.rb:7:in `recognize_path'

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:in
`load'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:39:in
`require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:22:in
`depend_on'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:178:in
`require_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:134:in
`load_file!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:97:in
`const_load!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:80:in
`const_load!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in
`const_missing'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:234:in
`traverse_to_controller'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:458:in
`recognize!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
`process!'
/home/ftp/workspace/availablezone.com/public/dispatch.fcgi:24

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require'
#{RAILS_ROOT}/app/controllers/geocode_controller.rb:4
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:in
`load'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:39:in
`require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:22:in
`depend_on'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:178:in
`require_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:134:in
`load_file!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:97:in
`const_load!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:80:in
`const_load!'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in
`const_missing'
routing.rb:234:in `traverse_to_controller'
generated/routing/recognition.rb:7:in `eval'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:234:in
`traverse_to_controller'
generated/routing/recognition.rb:7:in `recognize_path'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:458:in
`recognize!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
`process!'
/home/ftp/workspace/availablezone.com/public/dispatch.fcgi:24

This error occured while loading the following files:

/home/ftp/workspace/availablezone.com/public/../config/../app/controllers/geocode_controller.rb
    lib/geocoder
G.Durga P. (Guest)
on 2006-02-17 18:35
(Received via mailing list)
On 2/17/06, misiek <removed_email_address@domain.invalid> wrote:
> I need to load lib/geocoder
>
If you have installed geocoder via rubygems try
require 'rubygems'
require 'geocoder'

Prasad
David V. (Guest)
on 2006-02-18 17:13
(Received via mailing list)
DÅ?a Piatok 17 Február 2006 17:34 G.Durga P. napísal:
> On 2/17/06, misiek <removed_email_address@domain.invalid> wrote:
> > I need to load lib/geocoder
>
> If you have installed geocoder via rubygems try
> require 'rubygems'
> require 'geocoder'
>
> Prasad

Rails is only distributed via gems to my knowledge, so that should be
already
done in any code it runs.

David V.
This topic is locked and can not be replied to.