Harm Aa wrote:> Dear all,
>
> Rails is slowly driving me nuts, and I hope you can prevent that from
> actually happening. I am currently developing an app which uses OpenID
> as a login system. It requires the gem ruby-openid which in turn depends
> on ruby-yadis. On my development box I just installed these gems and
> there was much love. However on the shared server on which I am going to
> deploy these gems are, understandably, not present. But Rails would not
> be Rails if it didn''t have some clever solution for this.
> Enter the vendor directory. In the vendor dir I did "gem unpack
> ruby-openid;gem unpack ruby-yadis" which results in two directories. I
> added these to the svn and redeployed using capistrano. But still I got
> the MissingSourceFile exception. After reading some post I figured I
> needed to add the relevant directories to the config/environment.rb;
> "config.load_paths += %W( #{RAILS_ROOT}/vendor/ruby-openid-1.1.4/lib )
> config.load_paths += %W( #{RAILS_ROOT}/vendor/ruby-yadis-0.3.4/lib )"
> Now ''script/console production'' neatly accepts a
''require "openid"''
> however my app _still_ throws a MissingSourceFile exception! My question
> of course is; how is this possible? Any hints will be greatly
> appreciated, if not by me then by my SO. :)
>
> With kind regards,
> Harm
As an addendum, I verified whether or not the $LOAD_PATH is set
correctly in my openid_controller by making a dummy view which does
nothing but prints the $LOAD_PATH on (browser) screen. From that output
I can see that the $LOAD_PATH is _not_ properly set. It is _not_ the
same as when running ''script/console production''. How is this
possible??
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---