This project is archived and is in readonly mode.
Unable to run working edge app with vendored rails.
-
John Small
No it's not you, I can't generate a working edge rails app either.
-
Mischa
- Title changed from Unable to generate working edge app. to Unable to run working edge app with vendored rails.
+1
Changing title, as the following worksforme.
$ git clone git://github.com/rails/rails.git $ ruby rails/railties/bin/rails new_project $ cd new_project $ script/serverHowever, it doesn't work, and I get the same errors as Andriy, as soon as I add rails into vendor.
I played with it for a bit, to try to get it to work. It seems like ActiveSupport is just not loaded when /vendor/rails/railties/lib/rails/plugin.rb:1 is run.
E.g. requiring rubygems and active_support move the error to another file. Requiring that file moves it to another file.
-
Vidal Graupera
@ Andriy Tyurnikov
Try instead from your rails directory
cd vendor git clone git://github.com/rails/rails.git cd rails git checkout -b 2-3-stable origin/2-3-stable
-
Andriy Tyurnikov
@ Vidal Graupera ... and I will get stable 2-3 version of rails, right? I can get it without touching repo - from my gem. =)
With git clone git://github.com/rails/rails.git cd rails git checkout -b 2-3-stable origin/2-3-stable I'll be able to contribute to 2.3-stable bugfix? And the fact that edge is not usable for apps is ok - is that your point?
Perhaps contributor guide needs new section about usage of edge, and role of repo tags - I am not getting the idea :(
-
John Small
OK, going back to 2-3-stable fixes the problem so now it's a question of binary searching to see which commit after 2-3-stable introduced the problem.
-
John Small
Found it!
Commit ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 "No more free lunch"
After that commit you can't load Rails, before it you can. The commit relates to core_ext/kernel/requires.rb which is the thing missing.
I'll email Jeremy Kemper, it's one of his commits.
-
John Small
- Assigned user set to Jeremy Kemper
-
Taryn East
Just a +1. I've had the same issue from edge in vendor/rails.
-
John Small
- Tag set to active_support core_ext
So now we know which commit introduced the change we need to write a test to make sure that Rails can load. I was using script/console to test each version while binary searching. There must be a test already in the test suite to make sure that Rails console can load, clearly it didn't pick up this issue for some reason.
-
Jeremy Kemper
Looking at your backtrace, you're getting a mix of vendor/rails and the non-edge activesupport gem.
-
Mischa
Jeremy, Thanks - I think you may have found the problem. I will look at tonight and post if I can find solution.
-
John Small
Jeremy. This seems to be an odd mix of problems.
The rake -T --trace problem where it goes hunting in the gem version of active support rather than in vendor/rails is introduced in commit 7f6779c1d5e4ec7f642839caa7e86320720f77c8 "merge branch master into 'cherry'"
The seemingly similar problem with script/console or script/server comes in with commit ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 "No more free lunch"
That one doesn't involve the system looking for files in gem rails, it seems to be all within vendor/rails as in the traces in the message at the start of this thread.
-
Jeremy Kemper
- State changed from new to resolved
I made some updates to the boot process. Generating an app, using the console, and running the server work for me. Thanks for the report!
-
John Small
Brilliant, it works now!
-
sidcarter
Still have a problem doing this on Debian Linux 5.0 -
This is with the latest edge, rubygems 1.3.3 and ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
champloo:~/Sandbox/edge_rails$ script/server
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require': no such file to load -- active_support/core_ext/kernel/reporting (LoadError)from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from ./script/../config/../vendor/rails/railties/lib/rails/plugin.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 ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.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 ./script/../config/../vendor/rails/railties/lib/initializer.rb:1069:in `default_plugin_loader' from ./script/../config/../vendor/rails/railties/lib/initializer.rb:856:in `initialize' from ./script/../config/../vendor/rails/railties/lib/initializer.rb:107:in `new' from ./script/../config/../vendor/rails/railties/lib/initializer.rb:107:in `run' from ./script/../config/boot.rb:46:in `load_initializer' from ./script/../config/boot.rb:38:in `run' from ./script/../config/boot.rb:11:in `boot!' from ./script/../config/boot.rb:110 from script/server:2:in `require' from script/server:2Something that I am doing wrong ?
-
Jeremy Kemper
Interesting, works for me on 1.8.7, but reproducible with 1.8.6. I'll fix.
-
Jeremy Kemper
The problem was that AS isn't yet added to the load path when this file is required. Fixed by lazy-requiring the extension.
-
sidcarter
Yep, works now.
-
fdgpdsjfgj
- Importance changed from to
I resolved this by setting the variable RUBYLIB as defined in here:
http://www.tutorialspoint.com/ruby/ruby_environment_variables.htmI typed into my terminal:
export RUBYLIB=/usr/lib/ruby/1.8/:/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib:/usr/lib/ruby/1.8/i486-linux/
Probably your path is different.
To find the right path, wo can write
updatedb
locate active_support/core_ext/kernel/reporting.rb
And add to RUBYLIB what comes before "active_support".
(updatedb is only needed the first time)Best regards.
-
fdgpdsjfgj
I resolved this by setting the variable RUBYLIB as defined in here:
http://www.tutorialspoint.com/ruby/ruby_environment_variables.htmI typed into my terminal:
Probably your path is different.export RUBYLIB=/usr/lib/ruby/1.8/:/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib:/usr/lib/ruby/1.8/i486-linux/
To find the right path, wo can write
# updatedb
locate active_support/core_ext/kernel/reporting.rb
And add to RUBYLIB what comes before "active_support".
(updatedb is only needed the first time)Best regards.
-
fdgpdsjfgj
Isn't there a preview function here? I did it exactly as described in "Formatting help" but it didn't work :(