在Windows 7上安装Ruby on Rails-快速简便 [英] Installing Ruby on Rails on Windows 7 - quick and easy

查看:84
本文介绍了在Windows 7上安装Ruby on Rails-快速简便的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于在Windows 7笔记本电脑上安装RoR时遇到了很多问题,我想与您分享我的步骤.许多人告诉您使用InstantRails.我也做了那个,但是下面的选项对我来说最合适.

Since I had so many issues installing RoR on my laptop with Windows 7, I thought I would share my steps with you. Many people tell you to use InstantRails. I did that one too, but the option below worked best for me.

  1. 下载并安装Ruby 1.8.7 下载最新的RubyGems ,然后将文件提取到 http://rubyforge.org/frs/?group_id=126

    Download the latest RubyGems, and extract the file somewhere http://rubyforge.org/frs/?group_id=126

    使用控制台(在搜索中键入cmd来打开它),将cd放入RubyGems插入的目录中,然后键入:" ruby​​ setup.rb "(不带引号).

    Using your console (type cmd in your search to open it) cd into the directory you pit RubyGems and type: "ruby setup.rb" (without the quotes).

    需要一分钟,然后,如果一切顺利,您将看到很多文本行.

    It will take a minute and then if all went well, you will see lots of lines of text.

    1. 然后在您的控制台中输入:" gem install rails "(不带引号)
    1. Then in your console type: "gem install rails" (without the quotes)

    需要一分钟,然后,如果一切顺利,您将看到很多文本行.

    It will take a minute and then if all went well, you will see lots of lines of text.

    1. 然后在您的控制台中输入:" gem install sqlite3-ruby "(不带引号)
    1. Then in your console type: "gem install sqlite3-ruby" (without the quotes)

    需要一分钟,然后,如果一切顺利,您将看到很多行文本.这将更新您的数据库,即sqlite3.

    It will take a minute and then if all went well, you will see lots of lines of text. This is updating your database, which is what sqlite3 is.

    那么您应该有一个不错的安装并准备好滑轨!

    Then you should have a nice install and be ready to ride the rails!

    那里有很多教程,但是我买了这本书:带有Rails的敏捷Web开发(3)-

    There are many tutorials out there but I bought this book: Agile Web Development with Rails (3) -

    我首先购买了Simply Rails 2,甚至与作者聊了一会儿.如果我留在InstantRails上,Simply Rails 2是一个很好的选择.如果您像我这样的设计师,并且要花更长的时间才能掌握编程的编码方面,他的解释会很好.

    I first bought Simply Rails 2 and even chatted with the author a little. Simply Rails 2 was a good fit if I stayed with InstantRails. He really explains everything well if you are a designer (like me) and are taking longer to grasp the coding side of programming.

    在此之后,您还有什么要分享的步骤吗?这有帮助吗?

    Are there any steps after this that you would like to share? Is this helpful?

    注意-感谢Zachary在此URL 安装适用于Windows 7的Ruby on Rails(最新),帮助我入门.

    Note - Thanks to Zachary at this url Installing Ruby on Rails for Windows 7 (up to date) for helping me get started.

    值得一提的编辑器(但不是免费的)-RubyMine http://www.jetbrains.com/ruby/

    Editor worth mentioning (but not free) - RubyMine http://www.jetbrains.com/ruby/

    推荐答案

    InstantRails 2.0源自2007年,因此已经过时了. 仍然有很多用户以此为开端,这仍然很奇怪.

    InstantRails 2.0 is from 2007 and is thus sorely outdated. It still is weird how there remain a lot of users that keep starting with that.

    我总是建议您执行以下操作:

    I would always recommend doing the following:

    • use the latest version from Rubyinstaller.org (now they are 1.8.7p302)

    无需单独安装rubygems软件包,它包含在rubyinstaller中(因此也包含在您使用的软件包中).您可以只运行可执行文件,命令ruby -vgem -v应该起作用.为了安全起见,您可能需要执行gem update --system.

    there is no need to install the rubygems package seperately, it is included in the rubyinstaller (so also in the one you used). You can just run the executable and the commands ruby -v and gem -v should work. You might want to do a gem update --system to be safe.

    还要安装 devkit !它允许您安装需要编译二进制代码(如thin)的gem.

    also install the devkit! it allows you to install gems that need to compile binary code (like thin).

    请安装一组常见的Windows gems,以供您使用.我在此帖子中写了一个批处理文件.

    install a common set of windows gems for your pleasure. I have a batch-file written up in this post.

    安装git

    安装您选择的编辑器(免费的Netbeans,或使用很棒的Rubymine!)

    install an editor of your choice (Netbeans which is free, or use Rubymine which is awesome!)

    玩得开心! :)

    [2014年2月更新]

    [UPDATE February 2014]

    我在一次RailsGirls聚会上提供了帮助,在那里我们很快就使用 RailsInstaller 来启动这些女孩. (并且适用于Windows和Mac OSX).虽然我个人比较喜欢手动执行此操作,但这是让您入门的绝佳选择.

    I helped at a RailsGirls meet, and there we got the girls started up in no time using the RailsInstaller (and it is available for Windows and Mac OSX). While I personally prefer to do it manually, this is a great alternative to get you started.

    这篇关于在Windows 7上安装Ruby on Rails-快速简便的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆