安装ruby

 (这些文章都是从我的个人主页上粘贴过来的,大家也可以访问我的主页 www.iwangzheng.com)

 

过程中有点小曲折,我们leader是技术大牛,现在我生命中多了个超高智商处女座man了,还有一个是我老爸。o(∩∩)o..

记录下命令行:

rbenv

rbenv install -l

rbenv install 1.9.3-p484

ruby -v (报错ruby:commond not found)

rbenv  global 1.9.3-p484

ruby -v(正常了)

gem  install   bundler

rbenv  rehash

bundle install

(报错如下 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.)

原因是libxml2文件丢失

sudo apt-get install libxml2-dev  libxslt-dev

bundle install(这下正确了)

bundle exec rails server(报错)

cd config/

ll(看一下这里的conf文件)

cp log4r.yml.example log4r.yml(改一下文件后缀)

cp database.yml.example  database.yml(同上)

cp settings.yml.example settings.yml(同上)

rbenv rehash

rails sever

sudo mkdir -p  /opt/logs/cms

sudo chown  wangzheng:wangzheng /opt/logs/cms

mkdir log

touch log/development.log

rails server

posted @ 2014-03-03 11:10  冰凌花花~  阅读(188)  评论(0编辑  收藏  举报