Currently lsapi can't run rails 3 beta i fixed some issuses but still get errors.
Here is my railsrunner (only for test with hardcoded paths):
Here is returned error
To install and check rails3 with ruby 1.9.1 i recommend to use rvm
here is 8 minuts screencats how easy it is
http://railscasts.com/episodes/200-rails-3-beta-and-rvm
Here is my railsrunner (only for test with hardcoded paths):
Code:
#!/usr/bin/env ruby
ENV['RAILS_ROOT'] = "/Users/madmax/Sites/rails3-test"
Dir.chdir(ENV['RAILS_ROOT'])
#require 'lsapi'
require 'config/boot'
require 'active_support'
require 'action_controller'
require 'fileutils'
options = {
:environment => (ENV['RAILS_ENV'] || "development").dup,
:config => "/Users/madmax/Sites/rails3-test/config.ru",
:detach => false,
:debugger => false
}
server = Rack::Handler::LSWS
if File.exist?(options[:config])
config = options[:config]
if config =~ /\.ru$/
cfgfile = File.read(config)
if cfgfile[/^#\\(.*)/]
opts.parse!($1.split(/\s+/))
end
inner_app = eval("Rack::Builder.new {( " + cfgfile + "\n )}.to_app", nil, config)
else
require config
inner_app = Object.const_get(File.basename(config, '.rb').capitalize)
end
else
require 'config/environment'
inner_app = ActionController::Dispatcher.new
end
app = Rack::Builder.new {
use Rails::Rack::Static
use Rails::Rack::Debugger if options[:debugger]
run inner_app
}.to_app
ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord::Base)
begin
server.run(app, options.merge(:AccessLog => []))
ensure
puts 'Exiting'
end
Code:
/opt/lsws/fcgi-bin% ./rails3.rb
LSl/Users/madmax/Sites/rails/activesupport/lib/active_support/deprecation/proxy_wrappers.rb:17:in `new'LS
: LS+wrong number of arguments (1 for 2)LS
(LSArgumentErrorLS
)
LS~ from /Users/madmax/Sites/rails/activesupport/lib/active_support/deprecation/proxy_wrappers.rb:17:in `method_missing'
LSo from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:54:in `block in use'
LSg from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:73:in `call'
LSr from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:73:in `block in to_app'
LSg from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:73:in `each'
LSi from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:73:in `inject'
LSi from /Users/madmax/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/builder.rb:73:in `to_app'
LS) from ./rails3.rb:38:in `<main>'
To install and check rails3 with ruby 1.9.1 i recommend to use rvm
here is 8 minuts screencats how easy it is
http://railscasts.com/episodes/200-rails-3-beta-and-rvm