This project is archived and is in readonly mode.
[PATH] Use extended version of file_name in require_or_load
Reported by Ravil Bayramgalin | January 29th, 2011 @ 05:44 PM
Currently require_or_load uses extended version of filename to check wether file was loaded or not, but when it loads the file it uses just a filename instead of extended version.
So the same file gets loaded several times.
And even more if you use ruby 1.9, project directory isn't prepended to $LOAD_PATH, so require_or_load fails to load simple 'lib/some_file'.
This patch fixes it by using extended version of filename.
Comments and changes to this ticket
-
Ravil Bayramgalin January 29th, 2011 @ 06:22 PM
Sorry, current commit wasn't working correctly, I've removed it. So the problem still stands.
Simple way to illustrate, add following to application.rb:
config.autoload_paths << 'lib'
And try to reference module/class from lib using ruby 1.9 (but not in console since it's eagerly loads these files, it seems).
-
rails April 30th, 2011 @ 01:00 AM
- State changed from new to open
- Tag changed from rails 3.1, 1.9, activesupport, dependencies, patch to rails 31, 19, activesupport, dependencies, patch
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
rails April 30th, 2011 @ 01:00 AM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>