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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 04-02-2010, 10:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
what exactly is proxy_wrappers.rb line 17?

Maybe required a special function defined in lsreq object?
Reply With Quote
  #3  
Old 04-02-2010, 02:05 PM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Quote:
Originally Posted by mistwang View Post
what exactly is proxy_wrappers.rb line 17?

Maybe required a special function defined in lsreq object?
it is in deprecation folder that meen it probably will be removed in next version Don't know try install ruby 1.9.1 (with rvm is so easy) and rails 3 beta

http://railscasts.com/episodes/200-rails-3-beta-and-rvm
Reply With Quote
  #4  
Old 05-17-2010, 11:40 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
I wrote my own rails3 runner:

http://www.litespeedtech.com/support...ead.php?t=4025
Reply With Quote
  #5  
Old 01-28-2011, 06:43 PM
fantasydreaming fantasydreaming is offline
Senior Member
 
Join Date: Sep 2006
Posts: 76
This still hasn't been integrated into the official lsapi yet it seems??
Reply With Quote
Reply

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 01:52 AM.



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