railscasts.com是著名的Rails视频播客网站,大概每周出一期节目。从2007年3月份至今已经出了270多集,作者Ryan Bates (rbates on Twitter and ryanb on GitHub)持之不懈的工作着实让人钦佩。我也是陆陆续续看过一些,今日再次光顾railscasts.com网站,发现已经改版,令人欣喜的是其About介绍页里也提供了源代码的链接,细看时发现已经升级到Rails3了,一时手痒决定安装测试下。下面是安装测试过程:
1、前提
RVM、Ruby1.9.2已经安装。由于我的虚拟机在早前就已经安装了Rails3的环境,此处也就略去了。需要的同学可搜索相关文章。
2、下载:使用git工具
代码仓库地址:https://github.com/ryanb/railscasts
$ cd projects
$ git clone https://github.com/ryanb/railscasts.git
3、安装
3.1 生成配置文件,执行"script/setup"。
3.2 安装项目依赖gem包:
首先安装bundler,然后使用bundler自动安装其它依赖包。
Ubuntu@ip-10-48-111-136:~/projects/railscasts$ gem install bundler Successfully installed bundler-1.0.15 1 gem installed
以下是完整的安装日志:ubuntu@ip-10-48-111-136:~/projects/railscasts$ bundle install Fetching git://github.com/rails/exception_notification.git remote: Counting objects: 303, done. remote: Compressing objects: 100% (174/174), done. remote: Total 303 (delta 140), reused 234 (delta 105) Receiving objects: 100% (303/303), 38.75 KiB, done. Resolving deltas: 100% (140/140), done. Fetching git://github.com/ryanb/cancan.git remote: Counting objects: 2527, done. remote: Compressing objects: 100% (1120/1120), done. remote: Total 2527 (delta 1707), reused 2177 (delta 1380) Receiving objects: 100% (2527/2527), 323.91 KiB, done. Resolving deltas: 100% (1707/1707), done. Fetching git://github.com/jnicklas/capybara.git remote: Counting objects: 6685, done. remote: Compressing objects: 100% (2657/2657), done. remote: Total 6685 (delta 4481), reused 6103 (delta 3984) Receiving objects: 100% (6685/6685), 5.75 MiB | 2.56 MiB/s, done. Resolving deltas: 100% (4481/4481), done. Fetching source index for Using rake (0.8.7) Installing aaronh-chronic (0.3.9) Installing abstract (1.0.0) Installing activesupport (3.0.7) Installing builder (2.1.2) Installing i18n (0.5.0) Installing activemodel (3.0.7) Installing erubis (2.6.6) Installing rack (1.2.2) Installing rack-mount (0.6.14) Installing rack-test (0.5.7) Installing tzinfo (0.3.27) Installing actionpack (3.0.7) Installing mime-types (1.16) Installing polyglot (0.3.1) Installing treetop (1.4.9) Installing mail (2.2.19) Installing actionmailer (3.0.7) Installing arel (2.0.9) Installing activerecord (3.0.7) Installing activeresource (3.0.7) Installing acts_as_list (0.1.2) Installing addressable (2.2.5) Installing ancestry (1.2.3) Using bundler (1.0.15) Using cancan (1.6.3) from git://github.com/ryanb/cancan.git (at 2.0) Installing highline (1.6.1) Installing net-ssh (2.1.4) Installing net-scp (1.0.4) Installing net-sftp (2.0.5) Installing net-ssh-gateway (1.1.0) Installing capistrano (2.6.0) Installing nokogiri (1.4.4) with native extensions Installing ffi (1.0.7) with native extensions Installing childprocess (0.1.8) Installing json_pure (1.5.1) Installing rubyzip (0.9.4) Installing selenium-webdriver (0.1.4) Installing xpath (0.1.3) Using capybara (0.4.1.1) from git://github.com/jnicklas/capybara.git (at master) Installing coderay (0.9.5) Installing configuration (1.2.0) Installing daemons (1.1.2) Installing database_cleaner (0.6.7) Installing diff-lcs (1.1.2) Installing eventmachine (0.12.10) with native extensions Using exception_notification (1.0.0) from git://github.com/rails/exception_notification.git (at master) Installing factory_girl (1.3.2) Installing thor (0.14.6) Installing railties (3.0.7) Installing rails (3.0.7) Installing factory_girl_rails (1.0) Installing fakeweb (1.3.0) Installing multipart-post (1.1.0) Installing faraday (0.6.1) Installing guard (0.3.4) Installing guard-rspec (0.3.1) Installing jquery-rails (0.2.5) Installing launchy (0.4.0) Installing multi_json (0.0.5) Installing mysql2 (0.2.6) with native extensions Installing net-ldap (0.1.1) Installing nifty-generators (0.4.2) Installing oa-core (0.2.2) Installing rest-client (1.6.1) Installing oa-basic (0.2.2) Installing pyu-ruby-sasl (0.0.3.2) Installing rubyntlm (0.1.1) Installing oa-enterprise (0.2.2) Installing oa-more (0.2.2) Installing oauth (0.4.4) Installing oauth2 (0.3.0) Installing oa-oauth (0.2.2) Installing ruby-openid (2.1.8) Installing rack-openid (1.2.0) Installing ruby-openid-apps-discovery (1.2.0) Installing oa-openid (0.2.2) Installing omniauth (0.2.2) Installing paper_trail (2.2.5) Installing redcarpet (1.17.2) with native extensions Installing riddle (1.2.1) Installing rspec-core (2.6.3) Installing rspec-expectations (2.6.0) Installing rspec-mocks (2.6.0) Installing rspec (2.6.0) Installing rspec-rails (2.6.1) Installing simplecov-html (0.4.4) Installing simplecov (0.4.2) Installing thin (1.2.11) with native extensions Installing thinking-sphinx (2.0.1) Installing whenever (0.6.2) Installing will_paginate (3.0.pre2) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
4、配置
主要是修改config/database.yml文件中的数据库用户名与口令。
5、运行