Yes, I know that Rails *2.3.x* is no longer fully supported (this is why I'm posting it to rails/issues). Still, I would like to post the topic so that everyone who experience the same problem could quickly google for it (no, afaik no solution for this yet).
I'm trying to migrate a 1.5 years *2.3.x* app from Ruby version *1.8.7* to * 1.9.3-p0*.
The strange problem I encountered is that all controllers in my app *have to have* a corresponding helper class in /helpers folder. What made me think so is the following trace (and the steps I made after):
> /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/options.rb:188: > Use RbConfig instead of obsolete and deprecated Config. > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/inflector.rb:3:in > `<top (required)>': iconv will be deprecated in the future, use > String#encode instead. > NOTE: Gem.source_index is deprecated, use Specification. It will be > removed on or after 2011-11-01. > Gem.source_index called from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/rails/ gem_dependency.rb:21. > rename /home/gmile/intrview/lib/controllers_ext/clearence_ext.rb > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:184:in > *`require': cannot load such file -- admin/chargify_exports_helper > (LoadError)* > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:184:in > `require' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:291:in > `require_or_load' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:250:in > `depend_on' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:162:in > `require_dependency' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/actionpack-2.3.14/lib/a ction_controller/helpers.rb:197:in > `default_helper_module!' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/actionpack-2.3.14/lib/a ction_controller/helpers.rb:212:in > `inherited_with_helper' > *from > /home/gmile/intrview/app/controllers/admin/chargify_exports_controller.rb:1 :in > `<top (required)>'* > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:184:in > `require' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:184:in > `require' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:291:in > `require_or_load' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:250:in > `depend_on' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/activesupport-2.3.14/li b/active_support/dependencies.rb:162:in > `require_dependency' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:414:in > `block (2 levels) in load_application_classes' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:413:in > `each' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:413:in > `block in load_application_classes' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:411:in > `each' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:411:in > `load_application_classes' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:197:in > `process' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rails-2.3.14/lib/initia lizer.rb:113:in > `run' > from /home/gmile/intrview/config/environment.rb:9:in `<top (required)>' > from /home/gmile/intrview/spec/spec_helper.rb:4:in `require' > from /home/gmile/intrview/spec/spec_helper.rb:4:in `<top (required)>' > from spec/models/formsite_form_spec.rb:1:in `require' > from spec/models/formsite_form_spec.rb:1:in `<top (required)>' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/example_group_runner.rb:15:in > `load' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/example_group_runner.rb:15:in > `block in load_files' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/example_group_runner.rb:14:in > `each' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/example_group_runner.rb:14:in > `load_files' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/options.rb:134:in > `run_examples' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/lib/spec/ru nner/command_line.rb:9:in > `run' > from > /home/gmile/.rvm/gems/ruby-1.9.3-p0\@interview/gems/rspec-1.3.1/bin/spec:5: in > `<main>' > rake aborted!
After I added an empty admin/chargify_exports_helper file to /helpers folder, I passes but starts to complain about another one missing helper file. I wish I knew Rails internals well to fix this by myself.
I'm seeing the same problem. With a server full of legacy Rails 2.3.5 apps, attempting to run using Ruby 1.9.3p0 gives multiple LoadErrors for non-existent helper files. Does not seem to occur with latest Ruby 1.9.2. Vexing.
Will post to this thread if I find a workaround. Going to update my local dev box's RVM installation to 1.9.3p0 to see if I can find a solution.
I'm seeing the same issue. Rails 2.3.5, Ruby 1.9.3p0, LoadError's for "missing" helpers all over the place. For the moment, am downgrading to Ruby 1.9.2p290 until I can sort this out.
I found the problem! I forked rails and request a pull (https:// github.com/rails/rails/pull/3745), but they rejected it because 2.3 is no longer mantained... :-/
> I'm seeing the same issue. Rails 2.3.5, Ruby 1.9.3p0, LoadError's for > "missing" helpers all over the place. For the moment, am downgrading to > Ruby 1.9.2p290 until I can sort this out.
I was actually thinking it would be nice if you will be able to make it as a gem or plugin, but I don't know if gem/plugin can override that setting just in time before the exception ever came up or not.
- Prem
Sent from my iPhone
On Nov 24, 2011, at 8:56 PM, JoeLoui <joe.escala...@gmail.com> wrote:
> I found the problem! I forked rails and request a pull (https:// > github.com/rails/rails/pull/3745), but they rejected it because 2.3 is > no longer mantained... :-/
> On Nov 18, 4:18 pm, Irongaze <zaph...@gmail.com> wrote: >> I'm seeing the same issue. Rails 2.3.5, Ruby 1.9.3p0, LoadError's for >> "missing" helpers all over the place. For the moment, am downgrading to >> Ruby 1.9.2p290 until I can sort this out.
> -- > 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 rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
> I was actually thinking it would be nice if you will be able to make > it as a gem or plugin, but I don't know if gem/plugin can override > that setting just in time before the exception ever came up or not.
> - Prem
> Sent from my iPhone
> On Nov 24, 2011, at 8:56 PM, JoeLoui <joe.escala...@gmail.com> wrote:
>> I found the problem! I forked rails and request a pull (https:// >> github.com/rails/rails/pull/3745), but they rejected it because 2.3 is >> no longer mantained... :-/
>> On Nov 18, 4:18 pm, Irongaze <zaph...@gmail.com> wrote: >>> I'm seeing the same issue. Rails 2.3.5, Ruby 1.9.3p0, LoadError's for >>> "missing" helpers all over the place. For the moment, am downgrading to >>> Ruby 1.9.2p290 until I can sort this out.
>> -- >> 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 rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
> -- > 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 rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
That is a good idea, it doesn't seems too complicated. Like Prem says, I too don't know if a gem/plugin could go that deep, I'll try the initializer idea...
On Nov 25, 2:37 am, Wael Nasreddine <wael.nasredd...@gmail.com> wrote:
> Maybe MonkeyPatch in an initializer? or in config/application.rb just > after loading rails?
> -- > Wael Nasreddine > Sent from my iPhone
> On Nov 25, 2011, at 5:35, Prem Sichanugrist <sikand...@gmail.com> wrote:
> > I was actually thinking it would be nice if you will be able to make > > it as a gem or plugin, but I don't know if gem/plugin can override > > that setting just in time before the exception ever came up or not.
> > - Prem
> > Sent from my iPhone
> > On Nov 24, 2011, at 8:56 PM, JoeLoui <joe.escala...@gmail.com> wrote:
> >> I found the problem! I forked rails and request a pull (https:// > >> github.com/rails/rails/pull/3745), but they rejected it because 2.3 is > >> no longer mantained... :-/
> >> On Nov 18, 4:18 pm, Irongaze <zaph...@gmail.com> wrote: > >>> I'm seeing the same issue. Rails 2.3.5, Ruby 1.9.3p0, LoadError's for > >>> "missing" helpers all over the place. For the moment, am downgrading to > >>> Ruby 1.9.2p290 until I can sort this out.
> >> -- > >> 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 rubyonrails-core@googlegroups.com. > >> To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > >> For more options, visit this group athttp://groups.google.com/group/rubyonrails-core?hl=en.
> > -- > > 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 rubyonrails-core@googlegroups.com. > > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-core?hl=en.
> To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en.
As Wael, I put a initializer (config/initializers) with a single line: MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1] and that's it!
On Nov 25, 10:21 am, "Wael M. Nasreddine" <wael.nasredd...@gmail.com> wrote:
> > To post to this group, send email to rubyonrails-core@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-core+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-core?hl=en.
On Friday, November 25, 2011 8:36:10 AM UTC-5, JoeLoui wrote:
> As Wael, I put a initializer (config/initializers) with a single line:
> MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
> and that's it!
> On Nov 25, 10:21 am, "Wael M. Nasreddine" <wael.nasredd...@gmail.com>
> wrote:
> > What about:
> > MissingSourceFile::REGEXPS.push([/^cannot load such file -- (.+)$/i, 1])
> > Just after loading rails!
> > On Fri, Nov 25, 2011 at 14:16, gmile <iamex...@gmail.com> wrote:
> > > Any idea of what to put in *config/application.rb*?
> > > To post to this group, send email to rubyonra...@googlegroups.com<javascript:>
> .
> > > To unsubscribe from this group, send email to
> > > rubyonrails-co...@googlegroups.com <javascript:>.
> > > For more options, visit this group at
> > >http://groups.google.com/group/rubyonrails-core?hl=en.
I get this error: /usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.7/lib/active_support/depend encies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead. /usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.7/lib/active_record/dynamic_ matchers.rb:50:in `method_missing': undefined method `write_inheritable_array' for #<Class:0x00000003c2c380> (NoMethodError)
I tried your solution I made a file in config/initializers/ with: MissingSourceFile::REGEXPS.push([/^cannot load such file -- (.+)$/i, 1])
Any help would be very appreciated. I am fairly new so could you explain steps, please. Thanks!