LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Rails 3.0 beta & ruby 1.9.1 don't works

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-29-2010, 02:50 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Default Rails 3.0 beta & ruby 1.9.1 don't works

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):

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
Here is returned error

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
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:50 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.