-
Notifications
You must be signed in to change notification settings - Fork 1
rails install 说明
-
======================================================
-
======windows 下安装ror
-
http://rubyonrails.org/download 下载rubyinstaller 并安装
-
cmd中用gem install rails --pre
-
加代理附加如下命令 -p --http-proxy http://...:3128
-
更新依赖的gem
-
gem install rails --include-dependencies
-
gem install sqlite3
-
安装后会有个提示,需要下载sqlite3.dll放到ruby\bin下面
-
======================================================
-
======bundle install 执行时无法加入proxy参数的问题
-
在cmd中运行以下命令:
-
set proxy=http://...:3128
-
但是有时这个命令没有作用. 另外有些人说,windows下设置proxy应该用大写,如下. 这个有时也会起作用
-
set HTTP_PROXY=http://...:3128
-
再运行bundle install 就会默认通过这个代理访问了
-
(注意,set proxy对gem install没有作用)
-
======================================================
-
======升级到3.0.6 15:13 2011-4-7
-
gem install rails
-
修改/demo/gemfile 中的 gem 'rails', '3.0.5.rc1' 为 gem 'rails', '3.0.6'
-
bundle install
-
======================================================
-
=======安装其他gem
-
gem install activesupport -p --http-proxy http://...:3128
-
特定版本:
-
gem install activesupport --version 3.0.3 -p --http-proxy http://...:3128
-
======================================================
-
======安装passenger
-
gem install passenger -p --http-proxy http://...:3128
-
passenger-install-apache2-module
-
======================================================
-
======git clone code
-
git config --global http.proxy http://...:3128
-
git命令必须使用对应的http地址,或者https
-
例如spree的git命令为git clone git://github.com/spree/spree.git spree,改为
-
git clone https://github.com/neerajdotname/spree.git spree
-
git clone https://github.com/michaeldv/fat_free_crm.git fat_free_crm
-
git clone https://github.com/crossroads/fat_free_crm.git fat_free_crm3 for rails3
-
======================================================
-
======安装DevKit
-
在http://rubyinstaller.org/downloads/ 下载DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe
-
cd <DEVKIT_INSTALL_DIR>
-
ruby dk.rb init
-
打开<DEVKIT_INSTALL_DIR>\config.yml查看其中的ruby安装目录设置是否正确
-
ruby dk.rb review 查看安装准备信息
-
ruby dk.rb install
-
如果安装不了, 添加 --force
-
测试安装是否成功:
-
gem install rdiscount --platform=ruby
-
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('Hello RubyInstaller').to_html"
-
======================================================
-
======enki
-
git clone https://github.com/xaviershay/enki.git enki
-
cd enki
-
git checkout -b myblog # Create a new work branch
-
bundle install # Install all the required gems
-
cp config/database.example.yml config/database.yml
-
======================================================
-
======nokogiri-1.4-4版在windows下不能使用的问题
-
rake db:migrate
-
rake aborted
-
the specified procedure could not be found. - Init_nokogiri
-
解决办法,更新nokogiri到 1.4.4.1版, 在RubyInstallFolder\lib\ruby\gems\1.9.1\gems里把nokogiri-1.4.4-x86-mingw32里的内容用nokogiri-1.4.4.1-x86-mingw32的内容全部覆盖.