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.
9aa1e92a0ebb17fdaad2fa39b4c52b8a?d=identicon&s=25 misiek (Guest)
on 2006-02-16 23: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
F1ae87d23c050dbad815489dbde2f226?d=identicon&s=25 G.Durga Prasad (Guest)
on 2006-02-17 17:35
(Received via mailing list)
On 2/17/06, misiek <michaelaugustyniak@gazeta.pl> wrote:
> I need to load lib/geocoder
>
If you have installed geocoder via rubygems try
require 'rubygems'
require 'geocoder'

Prasad
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-02-18 16:13
(Received via mailing list)
DÅ?a Piatok 17 Február 2006 17:34 G.Durga Prasad napísal:
> On 2/17/06, misiek <michaelaugustyniak@gazeta.pl> 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 Vallner
This topic is locked and can not be replied to.