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安装:
http://rubyforge.org/frs/download.php/29263/ruby186-26.exe
官方网站下载ruby186-26(for windows),默认安装ruby;
路径c:\ruby
二,rails下载安装:
http://rubyforge.org/frs/download.php/29361/rails-2.0.2.zip
下载rails2.0.2.zip,将其copy至ruby安装路径,并改名为rails.zip;
尝试不解压� ......
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 ......
Python和Ruby的对比,纠正一些误解
下面是我在看两篇关于Python和Ruby对比的文章时,所作的纠正,原文都是广泛流行的,比较好找。
------------------------------------------------------
《ruby和python的比较》更正一点事情
1、文档、开源项目、库支持,这些东西Ruby不要跟Python比,不是几个数量级的问题,何必貌� ......
在使用中ruby的过程中难免会遇到提高性能的问题,由此便想起了ruby线程。但是我在使用中却发现ruby的线程却不能提高性能。我写了以下代码,做了些简单测试。
代码
# -*- coding: GB2312 -*-
require 'date'
# 使用线程,线程的处理代码里没有sleep
def have_thread_no_sleep
p Time.now
thread1 = Thread.new do
......
1. ruby已成为1.87
2. 必须先安装安装光盘里的新的xcode,在"optional"目录里
3. 可能需要重新安装macport
http://trac.macports.org/wiki/Migration
4. 或者升级macport
http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard
$ sudo port selfupdate
$ sudo port sync
$ sudo port upgrade --force insta ......