At 1:00 PM +0200 10/10/08, Michael Koziarski wrote:
> > In general a task that installs a gem shouldn't need to rely on much.
>
>The gem tasks depend on the initializer firing up because they allow
>things like config.gem 'rspec' in test.rb but not development.rb. Can
>you reproduce this in an empty test app?
This problem is NOT reproducible in a simple test app:
rails test2_1_1
cd rails2_1_1
echo 'MY_CONSTANT = true' > config/initializers/test2_1_1.rb
add:
if MY_CONSTANT
puts "MY_CONSTANT exists"
end
to app/application.rb
add to end of Rails::Initializer.run do |config| block:
config.gem "rspec-rails", :lib => "spec"
$ rake gems:install
(in /Users/stephen/dev/rails/test2_1_1)
MY_CONSTANT exists
$ rake gems:unpack
(in /Users/stephen/dev/rails/test2_1_1)
MY_CONSTANT exists
Unpacked gem: '/Users/stephen/dev/rails/test2_1_1/vendor/gems/rspec-rails-1.1.8'
>So unless I'm misreading this, it seems we're requiring application.rb
>before we try to run the gem installs, but we *haven't* fired the
>initializers yet?
>
>Is it perhaps caused by one of your plugins (rspec f.ex) requiring
>application.rb?
>--
There's something different between the apps -- -- I will investigate further
-- if I find anything further that might indicate a rails problem I'll update
this thread.
Thanks for your response.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---