在 Windows 的导轨上安装 ruby [英] install ruby on rails on windows
本文介绍了在 Windows 的导轨上安装 ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在 ruby on rails 中运行一个内置的应用程序.我已经安装了 ruby 1.9.2、rails 3.2.1、gem 1.8.15、Netbeans 6.8、glassfish v3、jdk6u30 和 mysql,但仍然无法运行.
I need to run an application built in ruby on rails. I have installed ruby 1.9.2, rails 3.2.1, gem 1.8.15, Netbeans 6.8, glassfish v3, jdk6u30 and mysql but still, I can't get it run.
如何在 WindowsXP 上安装 ruby on rails?
How do I install ruby on rails on WindowsXP?
推荐答案
我必须在工作时在 Windows 上编码并部署到 Linux,这就是我使用的
I have to code on Windows at work and deploy to Linux and this is what I use
- Ruby 安装程序
- Ruby 开发工具包
- 安装 Rubygems
- 为后续步骤打开 Ruby 命令提示符
- gem 安装包
- 捆绑安装mysql
- 捆绑安装导轨
- 转到您要放置 rails 应用程序的目录(例如 cd \rails_source)
- rails new(插入你想要的应用名称)
- 完成后,cd进入目录
- 编辑 Gemfile 以请求 gem 'mysql'
- cd 配置
- 编辑 Database.yaml 以查找 mysql db
- cd ..
- 为您的 mysql 实例创建一个名为 _development 的数据库
- 回到 rails 命令行
- 捆绑 exec rails g 脚手架(如 blog_entry)
- 捆绑 exec rake db:migrate
- 捆绑 exec rake 路由
- 在输出中查找您想要的路线
- 捆绑 exec rails
- 打开浏览器
- 转到http://localhot:3000/
- 您应该会看到一个普通的应用
您还可以查看Rails for Zombies,这是一个可视化教程.它不是面向窗口的,但它有助于填补空白
You can also check out Rails for Zombies which is a visual tutorial. It is not windows oriented but it helps fill in the gaps
这篇关于在 Windows 的导轨上安装 ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文