If I'm understanding you correctly, you want to load up script/console (or
rails console), instantiate a Seller object, and then access it from the
browser? I'm not sure you can do that, because your console is a separate
instance of the application (it may access the same database but it's
running in a different location in memory if I understand it correctly).

If you're just trying to get it to work in your application (no console),
then where are you putting `require 'amatch'`? Somewhere all of the parts of
your app need it, I hope!

Phillip Ridlen
@philtr

On Sat, Aug 14, 2010 at 12:39 PM, Ze Ca <li...@ruby-forum.com> wrote:

> Philip,
>
> Thank you for your help, that worked! I put that extra code in the
> model, but I still get the uninitialized constant error in my browser
> when accessing the show action. Not sure what may be the issue.
>
> Thanks again for your help!
>
> Phillip Ridlen wrote:
> > In your console, you either need to
> >
> >> include Amatch
> >> m = Sellers.new("hello")
> >
> > or
> >
> >> m = Amatch::Sellers.new("hello")
> >
> >
> > Phillip Ridlen
> > @philtr
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to