Ruby 一步步安装
http://www.gayathri-frenzy.com/technology/ruby-on-rails
I kept thinking for a while on what do I have next in the store
Here we go “Ruby on Rails”
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby Programming language.Ruby is a pure object-oriented programming language with a super-clean syntax that makes programming elegant and fun.
What is Rails?
Rails is an open source Ruby framework for developing web-based, databasedriven applications. Dozens of frameworks are out and most of them have been around much longer than Rails. Why do we then have a different framework?
Rails help us in developing a web application at least ten times faster than we can with a typical Java framework. We can–without making any sacrifices in the quality of our application!
When I got started with this topic, I just lacked a proper installation guide to help me with the installation. So I’m trying to make my reader’s life easier.
Ruby on Rails Installation:
To develop a web application using Ruby on Rails Framework, install the following software:
· Ruby
· The Rails framework
· A Web Server
· A Database System
We can use the WEBrick Web Server which comes with Ruby.Rails works with many database systems, including MySQL, PostgreSQL, SQLite, Oracle, DB2 and SQL Server.
Rails Installation on Windows:
1. Install Ruby
Download an installation package from rubyinstaller.rubyforge.org.
Follow the download link, and run the resulting installer. We will get RubyGems along with this package.
2. With Ruby Gems loaded, we can install Rails and its dependencies through the command line.
C:\> gem install rails –include-dependencies
We would get the following error:
C:\Ruby>gem install rails –include-dependencies
INFO: `gem install -y` is now default and will be removed
INFO: use –ignore-dependencies to install only the gems you list
ERR
相关文档:
ruby on rails安装mysql数据库
1. 下载mysql软件
http://www.mysql.cn/
mysql中文官方网站下载安装软件,选择5.0
2. 安装mysql,设置默认字符集为utf-8
3. 下载mysql for ruby的驱动并安装
http://rubyforge.org/搜索mysql,找到mysql -win
点击下载,进入页面
http://rubyforge.org/frs/?group_id= ......
require 'win32ole'
excel = WIN32OLE::new('excel.Application')
workbook = excel.Workbooks.Open('E:\RubyApp\bmk.xls')
worksheet = workbook.Worksheets(1) #get hold of the first worksheet
worksheet.Select #bring it to the front -need sometimes to run macros, not for working with a worksheet from ru ......
irb 是从命令行运行的
irb 的命令行选项(摘自 Porgramming Ruby 第二版)
-f
禁止读取~/.irbrc Suppress reading ~/.irbrc.
-m
数学模式(支持分数和矩阵) Math mode (fraction and matrix support is available).
-d
设置#DEBUG为true(同ruby -d一样) Set $DEBUG to true (same as ``ruby -d'').
-r lo ......