Moving from linux to windows woes

Hi,

Ik have a project in CVS in my linux box. Now I would like to work on it
locally in my win xp machine. I checked out a copy on my windows box
(which was hard enough getting svn over SSH to work properly, but
anyways…)

When I run ruby script/server nothing much happens:

C:\railsapp>ruby script/server
=> Booting WEBrick…

C:\railsapp>

Browsing to localhost:3000 doesn’t work. I figured it may have something
to do with the paths so I ran the rails command and overwrote the
“scripts” directory. This made no difference at all.

Help much appreciated!

Jeroen

Jeroen H. wrote:

Hi,

Ik have a project in CVS in my linux box. Now I would like to work on
it locally in my win xp machine.

FYI: I run 0.14.3 and ruby 1.8.2 on both boxes.

Jeroen

Jeroen H. wrote:

=> Booting WEBrick…

C:\railsapp>

Browsing to localhost:3000 doesn’t work. I figured it may have
something to do with the paths so I ran the rails command and
overwrote the “scripts” directory. This made no difference at all.

It seems this line in environment.rb seems to cause a problem on
windows…

Player.image_path = “/images/players/”
After commenting out this line, the server starts normally. It would be
nice if I could some better error message somewhere. There is no startup
log for webrick or is there?

I’ll investigate

Based on a guess from your Player.image_path code, you could be using
RMagick to do things with images. You need to have the RMagick gem
installed on your Windows machine - there is a binary install for this
code
that works great.

Also, you need to make sure your end-of-line characters are correct for
the
different environments. If you save a script file with Windows EOLs,
these
won’t run on the linux machine. Subversion has a property setting to
generate the correct thing for the given environment, CVS probably has a
similar setting.

Tom F. wrote:

Based on a guess from your Player.image_path code, you could be using
RMagick to do things with images.

Thanks Tom, you guessed right, I’m impressed :wink:
Indeed that code loads the Player class which requires RMagick. I still
think an error message should be thrown somewhere though… Should I file
a bug report for this you reckon?

I tried installing RMagick by downloading and installing the gem. Still
have some problems getting it to work, it needs some bz2.dll file - I’ll
need to investigate that.

Yes, it shouldn’t be too hard to get that worked out with SVN.
Developing on windows and running on Linux is still not very
straightforward if you ask me.

Thanks again!

Jeroen

Jeroen H. wrote:

I tried installing RMagick by downloading and installing the gem.
Still have some problems getting it to work, it needs some bz2.dll
file - I’ll need to investigate that.

Didn’t read the docs. I forgot to run the post install script. Works
great now!

Jeroen

Hi

First comment would be it should be

ruby script\server

But it appears that ‘something’ is happening. For what it’s worth
I’ve been developing my current app under XP/OS X and Linux and have
had no problems running between any of them. As long as my postgres
settings were the same everything just ‘worked’.

Ian

Check your path to the ruby executable.

I had to create a custom dispatch-win.fcgi for mine which used the
second
ruby path. With the latest version or Rails, it supposed to just grab
the
ENV path, and can use that instead, but I am not sure what version you
are
running.

Warmest regards,
Nathan.


Nathaniel S. H. Brown Toll Free 1.877.4.INIMIT
Inimit Innovations Phone 604.724.6624
www.inimit.com Fax 604.444.9942

Nathaniel S. H. Brown wrote:

Check your path to the ruby executable.

I had to create a custom dispatch-win.fcgi for mine which used the second
ruby path. With the latest version or Rails, it supposed to just grab the
ENV path, and can use that instead, but I am not sure what version you are
running.

Hi Nathan,

It’s working okay now, even without changing the paths (0.14.3). I
needed to install RMagick on my windows box. I would have found that out
a lot sooner if some helpful error msg would have been thrown…

Jeroen