For starters, as it appears you are developing in windows, make sure you
are using the right Ruby 1.9.1 platform. Here’s the correct one:
Use the rubyinstaller-1.9.1-p243-rc1.exe one.
You’ll also need to download the developer kit so you can compile some
of your gems later on with this kit here:
Unzip the devkit and after your ruby installation is installed, copy and
paste the devkit per the installation notes inside of it within the same
base installation directory of your ruby installation.
Take what’s inside the zip of the devkit copy and paste within C:\ruby19
which will add some extra things to C:\ruby19\bin and also create a
devkit directory for C:\ruby19\devkit…
Then you need to install your gems using the correct platform which will
gem install “gemname” --platform x86-mingw32
… which will make sure that you are using the correct gems for your
platform type. The 1.9.1 package was compiled with mingw so you need to
force platform compiling to mingw.
If you have issues, consult the Ruby forum and not the Ruby on Rails
Secondly, if you are using an IDE environment to program and develop
within, say for example Netbeans, then the issue could extend to the IDE
and not to your environment. So, you want to make sure that you always
use a dos command prompt and run your server commands there first to
make sure it works properly.
ruby script/server --> as an example
Thirdly, you should get rid of webrick as soon as possible on windows
and go with mongrel. However, you’ll need to make sure that you have
the devkit installed in Ruby 1.9.1 in order to compile some of the
platform gems for mingw32.
You’ll also find that there are times that your gems won’t work, which
is why you always need to test them to see if they work. With ruby
1.9.1 you don’t need to require rubygems but you do this by going doing
Go to a command prompt.
Type irb and hit enter.
Type require ‘gemname’
The output should show => ‘true’
If you get a big long error list, then the gem is not compiled properly
for your system so you need to make sure you added your platform
arguments and if this still fails, you need to visit the following site:
… search for the gem and read the comments and find a better source for
Once all of your gems are tested in irb with require and they all show
true, then you know that you have zero issues with your gems, which
makes troubleshooting your environment easier.
Then boot your server using a dos window and not an ide window and make
sure it all works.
Gems that you should probably get in order:
gem install rails --platform x86-mingw32
gem install rack --platform x86-mingw32
gem install mongrel --source http://gems.rubyinstaller.org --platform
… and then get your database gems if you need those as well.
As you can see, this is not an easy process by any means and there are
correct steps to be taken.
Website Bio: http://jdezenzio.com/
Rails Production Sites: http://ncaastatpages.com