Currently, I decide to learn a web developing framework. Hence the previous good experience in github, Ruby(and Rails) seems to be a good choice.
3 $ make && make install
Without a minute's hesitation, I download the official windows installer and click it ... Oops, my ruby installation cannot find a usable compiler, thus impossible to build modules written in C code. So, cygwin become my first alternative that could provide full-power *nix-like experience.
When using cygwin, the setup process is identical to what you do in linux. So if you have some knowledge of how to use gnu autotools to build and install a software distributed in tarball, you'll be very familar with these steps below:
1 $ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
2 $ tar xf ruby-1.9.3-p0.tar,gz && cd ruby-1.9.3-p0
3 $ ./configure && make && make install
2 $ tar xf ruby-1.9.3-p0.tar,gz && cd ruby-1.9.3-p0
3 $ ./configure && make && make install
Then, in order to run Rails, you must build the ruby-openssl extension:
1 $ cd ext/openssl
2 $ ruby extconf.rb3 $ make && make install
- Perhaps you will need to install libopenssl-devel package in the cygwin setup.exe.
Cygwin is a simulation layer above native windows, occasionally you will meet this address conflict error. Don't be frightened, in cygwin console run rebaseall to remap all executable in bin directory.
In addition, you could run this command for special executables or dynamic libraries.
1 $ cd /usr/local/lib/ruby/1.9.1/i386-cygwin
2 $ rebase -d -b 0x68000000 -o 0x10000 etc.so
2 $ rebase -d -b 0x68000000 -o 0x10000 etc.so
Now, you can use ruby as usual(follow the official instruction):
- install ruby gem
- use gem to install rails
- test rails
- rails new testApp
- cd testApp && scrips/rails server
- open your brower and look at http://localhost:3000
没有评论:
发表评论