开发者

No up to date guides for installing latest version of Rails on Windows 7

开发者 https://www.devze.com 2023-02-10 01:28 出处:网络
I\'ve looked around the current answers for similar questions but still couldn\'t find the information I was looking for.

I've looked around the current answers for similar questions but still couldn't find the information I was looking for.

While there are countless guides to setting up rails, it seems there aren't that many which are up to date. The latest installation of Ruby 1.9.2 seems to come with RubyGems but I can't seem to install it by running the command gem install rails

On top of this I've read guides recommending to establish a linux environment. I'm even confused to what database to use "SQLite3" o开发者_运维知识库r "MySQL".

My question, is how the heck do I get Rails installed quickly on Windows 7, what database should I use with it and also whether it's worth installing a VM? Any up to date guides would also be appreciated. I'd like to have the most suitable environment to get started.


I started out with Windows, used Ruby/Rails for a month, then decided to go with Rails on Ubuntu under VirtualBox, using Putty to remote to it.

  • MySQL is installed on Windows (so that the VM doesn't become too slow).
  • All code is on VBox accessible Windows drive, everything else Rails-related is on Ubuntu.

All this lets me:

  • Use Ruby/Rails in it's "native" place i.e. *nix
  • Use my Windows 7 slick (IMO) GUI
  • Use my BeyondCompare, TortoiseGit
  • Learn linux (as mentioned below also)
  • Ask better questions / get more answers in the community (where everyone assumes ;) that you've either got Rails on Linux or a Mac) since everyone seems to be using *nix.

To me, it makes sense to not use Ruby/Rails on Windows, especially since hosting a Rails app will 99.999% be on a linux box. So, you will get to learn linux/Ubuntu and can be better prepared come hosting time. Bonus in resume + you won't be lost when asking questions down the road, and not wonder "is this problem installing this gem because I am using Windows?".

Also, I noticed that running things like rake was 2-3 times faster in Ubuntu than in Windows. And now I think it is good to have learnt linux. I must say linux excels at the command line, and I kind of like using it now. Linux/Ubuntu sucks at GUI (IM very strong O!).


Oh, and for Ruby/Rails on Windows, give Pik a try (it's the Windows version of RVM - Ruby Version Manager).

And just for the record, on Windows, I faced problems with installing RSpec; exceptions in WebBRICK; could not use imagemagick; and other small things I am glad to have forgotten.


The Rails Installer has recently been updated for Windows, and has the support of EngineYard to keep it up to date. But, it looks like it only installs Ruby 1.8.7 at the moment. But, it should be a good starting point.

You can read Engine Yard's announcement, and reasoning for getting the Rails Installer up to date here: http://www.engineyard.com/blog/2011/introducing-railsinstaller/


The problem with Windows is it's totally different than all the other OS's. Supporting it requires all this if WIN32 else business that's no fun at all, so support lags. And since no self-respecting developer would even want to run Rails on Windows, there's just very little incentive to keep support up to date.

Why not get a hosted Linux VM such as one at Slicehost and run your project there? The advantage of that is it's accessible from anywhere without having to set up port forwarding on your cable modem (assuming you have a static IP.)


Rails on Windows is poorly supported. And even if you can get the basic Rails environment up on Windows, you'll face various problems with many Ruby gems--they aren't tested in the Windows/Rails environment so they often have problems.

Alternatives I use a windows machine for developing Rails apps. But I never run the apps on my win box. I did it once a couple of years ago but found it to be a waste of time since many ruby gems don't work properly on windows.

Instead, I run Linux on an old PC as my development environment. I use Samba to mount the Linux box's filesystem on windows. Then I can use Windows text editors such as UltraEdit.

Another option that doesn't require a second machine is to load Linux on a secondary partition on your windows box. You can then boot into the Linux os and run Rails there.

0

精彩评论

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