First, above the Rails::Initializer.run block put ...

2 views
Skip to first unread message

Amanda

unread,
May 12, 2008, 10:31:16 PM5/12/08
to Ruby on Rails: Talk
I'm puzzling through these instructions:

http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/

And I've gotten as far as the instructions that read ... "First,
above the Rails::Initializer.run block put ..." but I don't have any
"Rails::Initializer.run" block.

Am I missing something? I'm trying to get something running again that
I didn't actually build. I can't tell whether the original author was
leaving things out or what.

Frederick Cheung

unread,
May 13, 2008, 4:23:08 AM5/13/08
to rubyonra...@googlegroups.com

On 13 May 2008, at 03:31, Amanda wrote:

>
> I'm puzzling through these instructions:
>
> http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/
>
> And I've gotten as far as the instructions that read ... "First,
> above the Rails::Initializer.run block put ..." but I don't have any
> "Rails::Initializer.run" block.
>

Then you're probably not looking in the right file, because rails
wouldn't run without it.

Fred

Amanda

unread,
May 13, 2008, 7:04:05 PM5/13/08
to Ruby on Rails: Talk
So if ...

grep -ir "Rails::Initializer" ./*

turns up nothing, you think I didn't get all the files I need?

On May 13, 4:23 am, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On 13 May 2008, at 03:31, Amanda wrote:
>
>
>
> > I'm puzzling through these instructions:
>
> >http://www.texperts.com/2007/12/21/using-action-web-service-with-rail...

Amanda

unread,
May 13, 2008, 7:11:30 PM5/13/08
to Ruby on Rails: Talk
Ignore this for now. Or don't. I have a basic app, the output of
"rails myapp" and I can see where it does have those lines:

./myapp/config/boot.rb: defined? Rails::Initializer
./myapp/config/boot.rb: Rails::Initializer.run(:set_load_path)
./myapp/config/environment.rb:Rails::Initializer.run do |config|

Ix Quic

unread,
May 17, 2008, 7:52:42 PM5/17/08
to rubyonra...@googlegroups.com
environment.rb is the file you're looking for. This is where the global
settings of your Rails app go.

"class Rails::Configuration ... end" goes before the Rails::Initializer.run
block. The lines starting with "config" go inside the
Rails::Initializer.run block.

Reply all
Reply to author
Forward
0 new messages