New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to Rails 4.0.0.beta1 Failed #9386

Closed
mdespuits opened this Issue Feb 23, 2013 · 15 comments

Comments

Projects
None yet
5 participants
@mdespuits
Contributor

mdespuits commented Feb 23, 2013

I might be really naive about upgrading to Rails 4, but I am not sure where to start on this one.

  • Currently running Rails 3.2.12
  • Upgraded to gem 'rails', '4.0.0.beta', github: 'rails/rails' with all other necessasry updates.
  • Removed gems that are not compatible just to get the server up
  • Ran rails s
$ rails s
=> Booting WEBrick
=> Rails 4.0.0.beta application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
NameError: uninitialized constant DemoApp::Application::Railties
  • Ran ack Railties -a to no avail.

Ideas?

Thanks!

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 23, 2013

Contributor

Also tried bundle exec rails s just to be sure...

Contributor

mdespuits commented Feb 23, 2013

Also tried bundle exec rails s just to be sure...

@carlosantoniodasilva

This comment has been minimized.

Show comment
Hide comment
@carlosantoniodasilva

carlosantoniodasilva Feb 23, 2013

Member

Hm, might be related to some dependency, can you show the Gemfile and the full stack trace please? Also, have you tried running rake rails:update to update app files as well (like generating bin/rails and updating config/* files)?

Member

carlosantoniodasilva commented Feb 23, 2013

Hm, might be related to some dependency, can you show the Gemfile and the full stack trace please? Also, have you tried running rake rails:update to update app files as well (like generating bin/rails and updating config/* files)?

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 23, 2013

Contributor

There wasn't a stack track on it, unfortunately. It just stopped running. As far as running rake rails:update, I didn't even know that existed! I won't be able to try until Monday, so I'll ping back here after I do.

Contributor

mdespuits commented Feb 23, 2013

There wasn't a stack track on it, unfortunately. It just stopped running. As far as running rake rails:update, I didn't even know that existed! I won't be able to try until Monday, so I'll ping back here after I do.

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

Updated to 4.0.0.beta1 and still getting the same error.

After some trial and error, I've narrowed the error down to the rubycas-client gem. When I have it defined in my Gemfile, I get that error. Otherwise (since my app depends on it), it will fail to require the right file.

Contributor

mdespuits commented Feb 26, 2013

Updated to 4.0.0.beta1 and still getting the same error.

After some trial and error, I've narrowed the error down to the rubycas-client gem. When I have it defined in my Gemfile, I get that error. Otherwise (since my app depends on it), it will fail to require the right file.

@mdespuits mdespuits closed this Feb 26, 2013

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor
demo_app $ rake rails:update --trace
rake aborted!
uninitialized constant DemoApp::Application::Railties
org/jruby/RubyModule.java:2677:in `const_missing'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/engine.rb:470:in `railties'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/application.rb:241:in `run_tasks_blocks'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/engine.rb:445:in `load_tasks'
org/jruby/RubyBasicObject.java:1659:in `__send__'
org/jruby/RubyKernel.java:2086:in `send'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/gem/full/path/to/demo_app/Rakefile:9:in `(root)'
org/jruby/RubyKernel.java:1046:in `load'
/gem/full/path/to/rake-10.0.3/lib/rake/rake_module.rb:1:in `(root)'
/gem/full/path/to/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:89:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:72:in `run'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:70:in `run'
org/jruby/RubyKernel.java:1046:in `load'
/gem/full/binpath/to/bin/rake:23:in `(root)'

Sorry for the strange paths. Kinda sensitive where I work...

Contributor

mdespuits commented Feb 26, 2013

demo_app $ rake rails:update --trace
rake aborted!
uninitialized constant DemoApp::Application::Railties
org/jruby/RubyModule.java:2677:in `const_missing'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/engine.rb:470:in `railties'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/application.rb:241:in `run_tasks_blocks'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/engine.rb:445:in `load_tasks'
org/jruby/RubyBasicObject.java:1659:in `__send__'
org/jruby/RubyKernel.java:2086:in `send'
/gem/full/path/to/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/gem/full/path/to/demo_app/Rakefile:9:in `(root)'
org/jruby/RubyKernel.java:1046:in `load'
/gem/full/path/to/rake-10.0.3/lib/rake/rake_module.rb:1:in `(root)'
/gem/full/path/to/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:89:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:72:in `run'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/gem/full/path/to/rake-10.0.3/lib/rake/application.rb:70:in `run'
org/jruby/RubyKernel.java:1046:in `load'
/gem/full/binpath/to/bin/rake:23:in `(root)'

Sorry for the strange paths. Kinda sensitive where I work...

@mdespuits mdespuits reopened this Feb 26, 2013

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

@carlosantoniodasilva Doesn't seem to be a gem issue. Removed pretty much all gems and still am getting this issue when running rake rails:update

Contributor

mdespuits commented Feb 26, 2013

@carlosantoniodasilva Doesn't seem to be a gem issue. Removed pretty much all gems and still am getting this issue when running rake rails:update

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

The extent of my Gemfile when running that command:

source "http://rubygems.org"

gem 'rails', '4.0.0.beta1'
gem 'rake', '10.0.3'

group :assets do
  gem 'sass-rails', '4.0.0.beta1'
end
Contributor

mdespuits commented Feb 26, 2013

The extent of my Gemfile when running that command:

source "http://rubygems.org"

gem 'rails', '4.0.0.beta1'
gem 'rake', '10.0.3'

group :assets do
  gem 'sass-rails', '4.0.0.beta1'
end
@frodsan

This comment has been minimized.

Show comment
Hide comment
@frodsan

frodsan Feb 26, 2013

Contributor

The same happens here with coffee-rails and JRuby https://travis-ci.org/rails/coffee-rails/jobs/5052898

Contributor

frodsan commented Feb 26, 2013

The same happens here with coffee-rails and JRuby https://travis-ci.org/rails/coffee-rails/jobs/5052898

@matt-hh

This comment has been minimized.

Show comment
Hide comment
@matt-hh

matt-hh Feb 26, 2013

Same issue here with latest rvm and jruby 1.7.3

A possible fix:

Move this line
https://github.com/rails/rails/blob/master/railties/lib/rails/application.rb#L58
to this file
https://github.com/rails/rails/blob/master/railties/lib/rails/engine.rb#L339

and it seems to work:

$ rails s
=> Booting WEBrick
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-02-26 13:31:34] INFO  WEBrick 1.3.1
[2013-02-26 13:31:34] INFO  ruby 1.9.3 (2013-02-21) [java]
[2013-02-26 13:31:34] INFO  WEBrick::HTTPServer#start: pid=8403 port=3000

another workaround: http://stackoverflow.com/questions/14527816/myappapplicationrailties-constant-missing-with-rails-4-beta-and-jruby-jruby

matt-hh commented Feb 26, 2013

Same issue here with latest rvm and jruby 1.7.3

A possible fix:

Move this line
https://github.com/rails/rails/blob/master/railties/lib/rails/application.rb#L58
to this file
https://github.com/rails/rails/blob/master/railties/lib/rails/engine.rb#L339

and it seems to work:

$ rails s
=> Booting WEBrick
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-02-26 13:31:34] INFO  WEBrick 1.3.1
[2013-02-26 13:31:34] INFO  ruby 1.9.3 (2013-02-21) [java]
[2013-02-26 13:31:34] INFO  WEBrick::HTTPServer#start: pid=8403 port=3000

another workaround: http://stackoverflow.com/questions/14527816/myappapplicationrailties-constant-missing-with-rails-4-beta-and-jruby-jruby

@carlosantoniodasilva

This comment has been minimized.

Show comment
Hide comment
@carlosantoniodasilva

carlosantoniodasilva Feb 26, 2013

Member

Weird, thanks for commenting, I'm bookmarking this to take a look.

Member

carlosantoniodasilva commented Feb 26, 2013

Weird, thanks for commenting, I'm bookmarking this to take a look.

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

@matt-hh I will be trying that line swap today. I'll report back the results

Contributor

mdespuits commented Feb 26, 2013

@matt-hh I will be trying that line swap today. I'll report back the results

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

My output after @matt-hh's original fix. Seems to work.

$  bundle exec rails s
=> Booting WEBrick
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-02-26 10:10:23] INFO  WEBrick 1.3.1
[2013-02-26 10:10:23] INFO  ruby 1.9.3 (2013-01-04) [java]
[2013-02-26 10:10:23] INFO  WEBrick::HTTPServer#start: pid=10579 port=3000
Contributor

mdespuits commented Feb 26, 2013

My output after @matt-hh's original fix. Seems to work.

$  bundle exec rails s
=> Booting WEBrick
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-02-26 10:10:23] INFO  WEBrick 1.3.1
[2013-02-26 10:10:23] INFO  ruby 1.9.3 (2013-01-04) [java]
[2013-02-26 10:10:23] INFO  WEBrick::HTTPServer#start: pid=10579 port=3000

spastorino referenced this issue Feb 26, 2013

Adding Back Rails::Engine::Railties#engines
Removing it breaks functionality with gems such as Thinking Sphinx.
This restores it with a deprecation warning. Closes #8551
@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Feb 26, 2013

Member

Isn't this https://gist.github.com/spastorino/a917b488cc6088cc4b34 enough to fix the issue?.
@mattdbridges can you test this patch?.

The issue is related to this #8551

Member

spastorino commented Feb 26, 2013

Isn't this https://gist.github.com/spastorino/a917b488cc6088cc4b34 enough to fix the issue?.
@mattdbridges can you test this patch?.

The issue is related to this #8551

@mdespuits

This comment has been minimized.

Show comment
Hide comment
@mdespuits

mdespuits Feb 26, 2013

Contributor

@spastorino Confirmed. That patch fixes the load error.

Contributor

mdespuits commented Feb 26, 2013

@spastorino Confirmed. That patch fixes the load error.

@carlosantoniodasilva

This comment has been minimized.

Show comment
Hide comment
@carlosantoniodasilva

carlosantoniodasilva Feb 27, 2013

Member

Thank you ❤️

Member

carlosantoniodasilva commented Feb 27, 2013

Thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment