Skip to content
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

Passenger not compatible with rails < 1.1 #149

Closed
FooBarWidget opened this issue May 29, 2014 · 6 comments
Closed

Passenger not compatible with rails < 1.1 #149

FooBarWidget opened this issue May 29, 2014 · 6 comments
Labels

Comments

@FooBarWidget
Copy link
Member

From albert.ramstedt on May 01, 2008 21:48:13

What steps will reproduce the problem? 1. Use Rails 1.0.0 (in my case)
2. Start app
3. See it complain about VERSION What is the expected output? What do you see instead? No worka What version of the product are you using? On what operating system? 1.0.3, Linux Please provide any additional information below. Since Rails::VERSION was named Rails::Version in < 1.1, and also defined in
another place, to have passenger work, it must handle that. It seems to
work with the following code in framework_spawner.rb:266

begin
  if ::Rails::VERSION::MAJOR >= 2
    require 'active_resource'
  else
    require 'action_web_service'
  end
# Means rails < 1.1
rescue NameError
  require 'action_web_service'
end

Maybe solving it a bit more elegantly by actually looking for
Rails::Version would be nicer, but this worked for me

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=48

@FooBarWidget
Copy link
Member Author

From honglilai on May 01, 2008 13:13:15

Labels: -Type-Defect Type-Patch

@FooBarWidget
Copy link
Member Author

From albert.ramstedt on May 01, 2008 13:24:48

Also, rails < 1.1 doesnt have the ruby-version-check rb which throws errors when the
framework spawner loads it through gems, since it tries to activate a newer rails to
require that particular file.

@FooBarWidget
Copy link
Member Author

From honglilai on May 11, 2008 10:04:09

Could you post a patch that handles ruby-version-check too? Thanks.

@FooBarWidget
Copy link
Member Author

From albert.ramstedt on May 12, 2008 20:32:42

begin
if ::Rails::VERSION::MAJOR >= 2
require 'active_resource'
else
require 'action_web_service'
end
require 'ruby-version-check'
# Means rails < 1.1
rescue NameError
require 'action_web_service'
end

and remove the ruby-version-check from the code above.

That should work, i guess, but I dont know, and i cant test it since i am on
vacation in Thailand right now. :)

@FooBarWidget
Copy link
Member Author

From honglilai on May 13, 2008 02:26:21

Thanks, it's been fixed. :)

Status: Fixed
Labels: Milestone-1.1.0 Compatibility

@FooBarWidget
Copy link
Member Author

From honglilai on June 11, 2008 00:33:50

Labels: -Milestone-1.1.0 Milestone-1.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant