no such file to load -- restClient (MissingSourceFile) HELP

14 views
Skip to first unread message

Morgan Morgan

unread,
Oct 4, 2009, 3:40:32 PM10/4/09
to rubyonra...@googlegroups.com
i don't get what is going on here. if i run the restclient command
that starts an irb with restclient it works fine but when i try to load
it from environment.rb with require 'rest_client' this is what i get...
it's driving me batty.


/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- restClient
(MissingSourceFile)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in
`require'
from
/home/morgan/public_html/tutoring.minulle.com/app/releases/20091004193614/app/controllers/upload_controller.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:265:in
`require_or_load'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in
`depend_on'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:136:in
`require_dependency'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:414:in
`load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in
`each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in
`load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in
`each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in
`load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:197:in
`process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in
`send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in
`run'
from
/home/morgan/public_html/tutoring.minulle.com/app/current/config/environment.rb:14
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/rails.rb:43:in
`load_application'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/rails.rb:23:in
`initialize'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/loader.rb:36:in
`new'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/loader.rb:36:in
`for'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/controllers/controller.rb:163:in
`load_adapter'
from
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/controllers/controller.rb:67:in
`start'
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/runner.rb:174:in
`send'
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/runner.rb:174:in
`run_command'
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/runner.rb:140:in
`run!'
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/bin/thin:6
from /usr/bin/thin:19:in `load'
from /usr/bin/thin:19
--
Posted via http://www.ruby-forum.com/.

Frederick Cheung

unread,
Oct 4, 2009, 4:38:12 PM10/4/09
to Ruby on Rails: Talk


On Oct 4, 8:40 pm, Morgan Morgan <rails-mailing-l...@andreas-s.net>
wrote:
> i don't get what is going on here.   if i run the restclient command
> that starts an irb with restclient it works fine but when i try to load
> it from environment.rb with require 'rest_client'  this is what i get...
> it's driving me batty.
>

Don't know restClient, but random guess: your upload controller is
requiring a file that requires a gem to be loading and you are
requiring that gem at the bottom of environment.rb (or at least after
the Initializer block)

Fred
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file to load -- restClient
> (MissingSourceFile)
>   from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>   from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependen cies.rb:158:in
> `require'
>   from
> /home/morgan/public_html/tutoring.minulle.com/app/releases/20091004193614/a pp/controllers/upload_controller.rb:1
>   from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>   from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>   from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependen cies.rb:158:in
> `require'
>   from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependen cies.rb:265:in
> `require_or_load'
>   from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependen cies.rb:224:in
> `depend_on'
>   from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependen cies.rb:136:in
> `require_dependency'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:414:in
> `load_application_classes'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in
> `each'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in
> `load_application_classes'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in
> `each'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in
> `load_application_classes'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:197:in
> `process'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in
> `send'
>   from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in
> `run'
>   from
> /home/morgan/public_html/tutoring.minulle.com/app/current/config/environmen t.rb:14
>   from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>   from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/rails.rb:43:in
> `load_application'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/rails.rb:23:in
> `initialize'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/loader.rb:36:in
> `new'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/rack/adapter/loader.rb:36:in
> `for'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/controllers/controller.rb:1 63:in
> `load_adapter'
>   from
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/controllers/controller.rb:6 7:in

Morgan Morgan

unread,
Oct 6, 2009, 1:03:57 PM10/6/09
to rubyonra...@googlegroups.com
Frederick Cheung wrote:
> On Oct 4, 8:40�pm, Morgan Morgan <rails-mailing-l...@andreas-s.net>
> wrote:
>> i don't get what is going on here. � if i run the restclient command
>> that starts an irb with restclient it works fine but when i try to load
>> it from environment.rb with require 'rest_client' �this is what i get...
>> it's driving me batty.
>>
>
> Don't know restClient, but random guess: your upload controller is
> requiring a file that requires a gem to be loading and you are
> requiring that gem at the bottom of environment.rb (or at least after
> the Initializer block)
>
> Fred

i figured it out. i was orignally loading it in another abandoned
controller which i finally got around to deleting and everything is
kosher now. apparently i misnamed the gem in the require statment in
the other controller as well.

so it was just (clean up after yourself dumbass) error.

thanks again.

Reply all
Reply to author
Forward
0 new messages