Hi guys, i am having a little problem. I have installed ruby 1.9.1 and rails 2.3.5. Ruby is working just fine. The rails applications is being created fine. But when i run the command ruby script/server i get an error that says "The program can't start because msvcrt-ruby18.dll is missing". I googled this message and is pointed to this page: http://www.garbagecollect.jp/ruby/mswin32/en/docum... I installed all there binaries but the error exists! The strange is that i get the error, it says that the server starts normally but when i go to the browser i can see nothing. Here's what i get: => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-01-24 13:12:51] INFO WEBrick 1.3.1 [2010-01-24 13:12:51] INFO ruby 1.9.1 (2009-07-16) [i386-mingw32] [2010-01-24 13:12:51] INFO WEBrick::HTTPServer#start: pid=644 port=3000 Any sollutions? Thanx in advance Kostas L.
on 2010-01-24 12:30
on 2010-01-24 18:00
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: http://rubyforge.org/frs/?group_id=167 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: http://rubyforge.org/frs/download.php/66888/devkit... 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. Example: C:\ruby19 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 be: 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 forum. 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 the following: 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: http://isitruby19.com .. search for the gem and read the comments and find a better source for your gem. 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 x86-mingw32 .. 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. Sincerely, Joel Dezenzio Website Bio: http://jdezenzio.com/ Rails Production Sites: http://ncaastatpages.com
on 2010-01-24 18:09
Also, one other note: I was helping to troubleshoot a person's problem awhile back and I wrote a quick outline of a complete installation with ruby and ruby on rails here: http://www.ruby-forum.com/topic/202311#881151 Read all of it before you begin.