Web app developed in WInXP want to run on Linux

Hi All,
I have developed a web application using RoR on Window-XP. Now my server
is on linux and want to get this running on linux machine. I tried
starting the server but it failed to boot in boot.rb at this line:

unless RUBY_PLATFORM =~ /mswin32/
require ‘pathname’
root_path = Pathname.new(root_path).cleanpath(true).to_s
end

so I changed(even though the file says not to do any changes) mswin32 to
linux. Again the server didn’t boot and failed at:
./script/…/config/boot.rb:18:in require': No such file to load -- rubygems (LoadError) from ./script/../config/boot.rb:18 from script/server:2:inrequire’
from script/server:2

So I thought if there is any one time change I can make so that I don’t
have to make these changes in installments? Is there any better way of
deploying Win-Xp RoR on Linux?

Please help!
Thanks

Again the server didn’t boot and failed at:
./script/…/config/boot.rb:18:in `require’: No such file to load –
rubygems (LoadError)

The error says the problem is with boot.rb on line 18. In my boot.rb
file the part you’ve identified occurs at the beginning of the file
(around lines 5-8) and the lines around 18 deal with loading rubygems
and initializer. I’m guessing that rubygems has not been correctly
installed (or isn’t present) on your Linux box.

Can you confirm or deny by trying to issue a ‘gem list --local’
command and confirm that you don’t get an error?


DeLynn B.
[email protected]

So I thought if there is any one time change I can make so that I don’t
have to make these changes in installments? Is there any better way of
deploying Win-Xp RoR on Linux?

Here’s the trick:

  1. on Linux, run rails myapp
  2. cd myapp
  3. rm -rf app
  4. copy your myapp/app folder from the win32 version to the linux
    version
  5. repeat 2-4 for other folders you have that have different content
    from the default rails app (for instance, public/images,
    public/stylesheets, etc)

It should run now. If you have version control for your windows app,
you’ll be even better off.

Thanks DeLynn and Bryan for your reply.

I have the below dir structure
/ruby/bin
erb
gem
gem_mirror
gem_server
gemwhich
generate_yaml_index.rb
irb
rails
rake
rdoc
ri
ruby
testrb
update_rubygems

/scratch/ruby/lib/ruby/gems/1.8/gems
actionmailer-1.1.1
actionpack-1.12.1
actionwebservice-1.1.2
activerecord-1.14.2
activesupport-1.3.1
rails-1.1.2
rake-0.7.1
sources-0.0.1

This makes me beleive that I have gem…But than I’m not able to do the
‘gem list --local’ or gem -v or any other commmands. What does this
mean? Is it that gems is not installed properly? Any help is
appreciated!

DeLynn B. wrote:

Again the server didn’t boot and failed at:
./script/…/config/boot.rb:18:in `require’: No such file to load –
rubygems (LoadError)

The error says the problem is with boot.rb on line 18. In my boot.rb
file the part you’ve identified occurs at the beginning of the file
(around lines 5-8) and the lines around 18 deal with loading rubygems
and initializer. I’m guessing that rubygems has not been correctly
installed (or isn’t present) on your Linux box.

Can you confirm or deny by trying to issue a ‘gem list --local’
command and confirm that you don’t get an error?


DeLynn B.
[email protected]
http://delynnberry.com

This makes me beleive that I have gem…But than I’m not able to do the
‘gem list --local’ or gem -v or any other commmands. What does this
mean? Is it that gems is not installed properly? Any help is
appreciated!

I’m going to guess that the path for gems is not in your environment.
On my machine ruby and gems are both located in /usr/bin. Can you type
“ruby -v” and get the version info, or do you need to do
“/ruby/bin/ruby -v”? If you need to do the later then you’ll want to
update your shells path.


DeLynn B.
[email protected]