`
guoyaxu
  • 浏览: 94318 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类

Ruby On Rails 安装 for Windows

阅读更多

一.安装
ruby安装图解教程
1).到rubyforge下载ruby一键安装包for windows.我下的是最新版本ruby186-25.exe. 然后双击安装即可.要查看是否安装成功,打开windows的cmd命令行窗口,输入ruby -v,如果出现ruby的版本号,说明安装好了
2).下载rubygems(一 个类似于linux下的apt-get在线安装包,我下的是最新版本rubygems-0.9.4.zip),解压后得到rubygems-0.9.4文 件夹,然后打开windows的cmd命令行窗口,cd进入rubygems-0.9.4文件夹.输入setup.rb命令安装gem.
3).安装好了gem,现在我们可以通过在线安装rails.在命令模式下输入gem install rails –remote回车,会自动安装rails,中间有提示是否安装某个文件,都选择y,然后按下回车即可. 输入rails -v,如果出现rails的版本号.说明rails安装成功.


二. 第一个”hello world”程序
1).随便新建个文件夹,比如我在d:\下新建了ror文件夹.然后cd d:\ror
2).输入rails hello回车,将会在ror文件夹下新建一个hello文件夹.里面有很多东东.
3).输入ruby script\server启动ruby服务.打开浏览器输入http://127.0.0.1:3000出现ruby的首页,说明ruby服务启动成功.
4).在D:\ror\hello\app\controllers文件夹下新建一个hello_world_controller.rb文件,右键编辑.输入:

class HelloWorldController < ApplicationController
def index
render_text “Hello World”
end
end

保存.
5).打开浏览器输入http://127.0.0.1:3000/Hello_World
看到显示的hello world!了吗??

分享到:
评论

相关推荐

    Rails for .NET Developers (Facets of Ruby)

    we'll help you get up and running as a Ruby on Rails developer on any operating system: Windows, Mac, or Linux. We start with a gentle introduction to the object-oriented Ruby language with examples ...

    ror-dev-env:基于 Ubuntu 14.04 64 位的 Ruby on Rails 环境,使用 Vagrant 和 VirtualBox

    - Windows 操作系统说明Windows用户可以从为Windows使用install git 当您开始为Windows安装github的先决条件时,将要求您重新启动重新启动后,它将开始github for windows安装github for windows 安装完成后,它将弹...

    EditPlus - text editor for Windows

    Syntax highlighting for HTML, PHP, Java, C/C++, CSS, ASP, Perl, JavaScript, VBScript, Python and Ruby on Rails. Also, it can be extended for other programming languages based on custom syntax files. ...

    railsinstaller-1.1.1.zip

    RailsInstaller. The easiest way to get up and running with Ruby on Rails. For Windows. Mac and Linux coming soon

    害虫调度程序:满足Terrier Technologies的Rails调度任务要求的Rails应用程序

    系统要求和安装此应用是使用Ruby 2.7.2版和Ruby on Rails 6.0.3.4版制作的此应用程序使用PostgreSQL数据库,版本13.0 该应用程序是使用Windows Subsystem for Linux开发的,但希望它也可以在其他平台上运行。...

    InstantRails v2.0 for windows.zip

    InstantRails,一个All In One的套件,可以帮助你快速搭建Ruby On Rails开发环境。 InstantRails自带了apachet和mysql,软件解压即可使用,如果已经在本机运行了apache和mysql,需要更改端口才能便之并存。

    Ebooks For Dummies Collection

    Investing Online For Dummies 5th Ed.pdf Ipaq For Dummies.pdf Iphone For Dummies.pdf Ipod & Itunes For Dummies 3rd Ed.pdf Ipod & Itunes 2nd Ed For Dummies.pdf ISBN-13 Special Ed For Dummies.pdf IBM ...

    CukeForce:Cucumber with Capybara for BDD in Salesforce

    确保您已安装 Ruby on Rails、Cucumber 和 Capybara -目前仅支持 Ruby 1.9.3 for Windows下面是关于安装 Cucumber for windows 的一些优秀说明 如果您收到 SSL 认证错误,请参阅此博客, 确保安装了 Selenium ...

    akelos for windows

    Akelos是一个类似于Ruby on Rails的PHP开发框架。它的主要目的是帮助程序员依据MVC模式开发基于数据库的多语言Web应用程序。它通过约定俗成代替配置来让你少写代码。此 外Akelos支持URL改写,数据库移植,纯PHP支持...

    Programming Ruby 1.9 & 2.0 The Pragmatic Programmers’ Guide 4th Edition

    Ruby is the fastest growing and most exciting dynamic language out there. If you need to get working programs delivered fast, you should add Ruby to your ...* Ruby runs on Windows, Linux, and Macs.

    rubyinstaller-devkit-2.5.3-1-x64.exe

    MSYS2 is required to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails. Moreover it allows the download and usage of hundreds of Open Source libraries which Ruby gems can ...

    Programming.Web.Applications.with.Node.Express.and.Pug

    Developers of web applications who come from Java/J2EE, ASP.NET, PHP, Ruby on Rails and want to explore the capabilities of JavaScript based server apps. It’s suitable for beginners that have a basic...

    promptly:短信提醒代码

    要求Promptly 是一个使用 Twilio 发送文本消息的 Ruby on Rails 应用程序。 如果您在设置 RVM、Ruby 和所有这些方面需要帮助,我们推荐关于精彩教程。 如果您在 Windows 上安装,请尝试 。 在 Windows 上安装 Rails ...

    Ric.Shreves.PDF文字版.pdf

    最新最全Ruby、Ruby on Rails精品电子书等学习资料下载 数据库管理系统(DBMS)精品学习资源汇总:MySQL篇 | SQL Server篇 | Oracle篇 平面设计优秀资源学习下载 | Flash优秀资源学习下载 | 3D动画优秀资源学习下载 ...

Global site tag (gtag.js) - Google Analytics