开发者

Problem with Ruby on Rails on Windows[msvcrt-ruby18.dll error] - newbie questions

I have installed Ruby 1.9.1 recently. Everything went fine, I installed the devkit, gems, rails and decided to use RadRails IDE. But, when I typed "ruby script/server" command, I got the error message telling me that msvcrt-ruby18.dll was not found. Still, I was able to run the WEBrick server. I also tried to open "http://localhost:3000" in my web browser - everything was fine, except this: when I clicked "About your application's environment", I got the error message that "something is not working" (or something similar). My OS is Vista Ultimate 64-bit. I have several questions: 1. I did some research and it seems that the problem is with the gem binaries - they are built on another version. If this is the case, how can I fix this? Should I use previous version of Ruby? Whic开发者_Go百科h version should I use? And, how serious is this problem? Am I missing something? 2. It seems that Aptana RadRails IDE installs all the needed gems when it is started for the first time. I guess that you do not need to install those gems manually after Ruby installation? 3. Should I run Ruby on Ubuntu instead? I can install Virtual Box and run the Ubuntu.

Thanks!


I fought with windows ruby development for over a year. I gave up and switched to Ubuntu and am quite happy with it.

When I switched i got the following benefit: -about a 30% ruby speed increase -gems just install properly and work - native libraries build. -my development machine now matches my deployment environment -none of the windows ssh key hassles. -about a quarter of my debugging mental space was freed up by not wondering "Is this a windows problem or my code?" -far less yak shaving

Now to address your specific problem try the steps outlined in this message and the one that follows it.

Good luck


The current release version 1.1.5 of Mongrel is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure Rubygems is up-to-date:

gem update --system

Then install the new pre-release version of Mongrel:

gem install mongrel --pre


Had the exact same error trying to run Heroku on Windows. Missing msvcrt-ruby18.dll

Cloverink's fix is spot on though!

Make sure you've got DevKit installed to help build gems properly first. Uninstall json gem and re-install using:

gem install json --platform=ruby -v 1.4.6


worked like a charm! but you need double dash "gem install json --platform=ruby". For the rails projects using bundler I got the gem and put it into the project. This code in Gemspec enabled us to isolate this issue. if RUBY_PLATFORM =~ /linux/ gem 'json', '1.4.6' else gem 'json', '1.4.6', :path=>'vendor/gems' end


I also had the same problem, you need to install Devkit here is the process you need to follow , It is very important that at the end you install what potatocakes said :

gem install json --platform=ruby -v 1.4.6

Otherwise it is going to install 1.5.0 and it will give you another error.

I last about 5 complete days to finally clone the application without any help. If you are here you are very near to be able to clone or edit your application, don't give up.


Install DevKit and reinstall json ( gem install json -platform=ruby )


I tried switching from Windows to Ubuntu and had the same, if not more trouble getting Ruby + Rails to work properly. In my opinion Rails especially is still in a state where if you aren't personally involved in the project, it is very hard to start using. I hear a lot of people talk about how easy it is to use Ruby on Rails, when in reality if you want to create anything more than a blog application (which is what 99% of it's tutorials are about) you end up spending just as much time as with any other framework.

Update - A year later.

I've tried Ruby on Rails again and this time started out with Rails Installer, a really easy way to get Rails running on Windows (although it is frustratingly slow sometimes). All in all, the Rails Tutorial is definitely the best way to learn Rails.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜