学习ROR随笔(二)

三. 使用rvm时提示RVM is not a function, selecting rubies with 'rvm use ...' will not work
  
解决方法: shell>rvm notes,查看注意事项,其中有提示将[[ -s "/home/sunfei/.rvm/scripts/rvm" ]] && source "/home/sunfei/.rvm/scripts/rvm",添加到.bashrc中

四. 使用rvm时提示no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand,缺少zlib包,
 
  解决方法:
   1.查看是否安装zlib,如未安装就首先下载安装,我是通过下载tar包安装的,安装后问题念旧
   2.shell>rvm [size=medium]
requirements,执行其中的相应部分的安装命令, 我使用的Additional
Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
  ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
执行上述的apt-get安装缺少的包.安装后问题依旧
   3.shell>rvm list #查看是否安装ruby及其版本.
     shell>which ruby #查看当前使用的ruby
     shell>rvm use 1.9.3 --default #设置默认ruby版本
   4.shell>问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值