Opened 12 years ago

Closed 12 years ago

#250 closed defect (fixed)

F15 comes with Rails 3

Reported by: geofft Owned by:
Priority: major Milestone: Fedora 15
Component: web Keywords:
Cc:

Description (last modified by ezyang)

Our Rails autoinstaller doesn't work any more, since it assumes Rails 2 command lines.

Rails 2 sites don't work any more.

Change History (15)

comment:1 Changed 12 years ago by ezyang

A vanilla autoinstalled Rails website seems to work fine.

comment:2 Changed 12 years ago by ezyang

Never mind, I'm wrong. Essentially everything breaks.

comment:3 Changed 12 years ago by ezyang

First problem: we appear to be pegging the Rails version in our autoinstaller, so it chokes when the gem is not available:

Missing the Rails 2.3.5 gem. Please gem install -v=2.3.5 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

comment:4 Changed 12 years ago by ezyang

Bumping the version then results in:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require': no such file to load -- initializer (LoadError)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
	from ./../config/boot.rb:55:in `load_initializer'
	from ./../config/boot.rb:38:in `run'
	from ./../config/boot.rb:11:in `boot!'
	from ./../config/boot.rb:110
	from ./../config/environment.rb:11:in `require'
	from ./../config/environment.rb:11
	from dispatch.fcgi:21:in `require'
	from dispatch.fcgi:21

comment:5 Changed 12 years ago by ezyang

Based on http://omgbloglol.com/post/353978923/the-path-to-rails-3-approaching-the-upgrade I think the problem is that boot.rb is wrong.

comment:6 Changed 12 years ago by ezyang

Swapping out boot.rb for latest version gives:

./../config/environment.rb:13: uninitialized constant Rails (NameError)
	from dispatch.fcgi:21:in `require'
	from dispatch.fcgi:21

We're definitely not supposed to overwrite environment.rb on upgrade.

comment:7 Changed 12 years ago by ezyang

Automated upgrades are a lost cause. Investigating if we can make Rails 2 and Rails 3 coexist.

comment:8 Changed 12 years ago by ezyang

  • Description modified (diff)

Installing the old gem triggers this bug:

http://stackoverflow.com/questions/5176782/uninitialized-constant-activesupportdependenciesmutex-nameerror

Fortunately the require 'thread' workaround works. It would be nice to update Rails to the latest version, which doesn't have this bug, but most autoinstalls are pegged to a specific version. We need an autoupgrade.

comment:9 Changed 12 years ago by ezyang

An alternative, idiotic fix, which doesn't involve autoupgrades, is making RubyGems? depend on 'thread' again (which is what triggered the problem, see: http://blog.segment7.net/2011/03/01/rubygems-1-6-0 )

comment:10 Changed 12 years ago by ezyang

Assessment: Rails 2 autoinstaller is not release blocker. Rails 2 breakage should be fixed by installing the old gem (either as a gem or an RPM; the former will is hackier but easier to do) and performing some fix to deal with the 'thread' problem.

comment:11 Changed 12 years ago by ezyang

Plan of action:

  • Repackage rubygems with "require 'thread'" DONE, but needs to be deployed
  • Install Rails 2.3.5 on all servers
  • Profit

comment:12 Changed 12 years ago by ezyang

  • Resolution set to fixed
  • Status changed from new to closed

Deployed. (repackaging was r2025)

comment:13 Changed 12 years ago by achernya

  • Resolution fixed deleted
  • Status changed from closed to reopened

It turns out that while this fixed Rails 2 applications, we currently don't have a working Rails 3 autoinstaller. As far as I can tell, this is caused by changes in the way Rails does FCGI, so it should be as simple as fixing dispatch.fcgi.

The Rails autoinstaller failed to even work, a bugfix was committed in r2123 and r2124.

comment:15 Changed 12 years ago by achernya

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.