#安装ruby
wgetftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5p12.tar.gz
tarxzvfruby-1.8.5.tar.gz
cdruby-1.8.5
./configure--prefix=/usr/local/ruby
make
sudomakeinstall
cd..
#安装好以后,修改操作系统PATH路径,加入/usr/local/ruby/bin:
#PATH=/usr/local/ruby/bin:$PATH设置放在/etc/profile中,对全局生效
vividness@vividness-desktop:~$ruby-v
ruby1.8.5(2006-12-25patchlevel12)[i686-linux]
#安装ruby-zlib
wget
tarzxvfruby-zlib-0.6.0.tar.gz
cdruby-zlib-0.6.0
/usr/local/ruby/bin/rubyextconf.rb
make
sudomakeinstall
#安装rubygems
wget
tatxzvfrubygems-0.9.1.tgz
cdrubygems-0.9.1
sudo/usr/local/ruby/bin/rubysetup.rb
cd..
vividness@vividness-desktop:~$gem-v
0.9.1
#安装RubyonRails
#本地安装
wegthttp://blog.sxia.net/temp/rails1.2.1.rar
或者
wget
wget
wget
wget
wget
wget
wegt
然后
sudogeminstallactivesupport-1.4.0.gem
sudogeminstallactiverecord-1.15.1.gem
sudogeminstallactionpack-1.13.1.gem
sudogeminstallactionmailer-1.3.1.gem
sudogeminstallactionwebservice-1.2.1.gem
sudogeminstallactiveresource-0.5.0.gem我提供的地址没有这一项
sudogeminstallrake-0.7.1.gem
sudogeminstallrails-1.2.1.gem
理想的结果是rals-v
1.2.1
但是结果确实
vividness@vividness-desktop:~/rails1.2.1$sudogeminstallactivesupport-1.4.0.gem
Password:
/usr/bin/env:ruby:Nosuchfileordirectory
请求问题出在哪?
自己解决自己顶
sudo/usr/bin/env
发现
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
QT_IM_MODULE=XIM
没有/usr/local/ruby/bin
但是我已经在/etc/profile的最后一行加上了
exportPATH=/usr/local/ruby/bin:$PATH
并且source/etc/profile了
没办法
最后sudochmod-R777/usr/local/ruby
然后vividness@vividness-desktop:~/rails1.2.1$geminstallactivesupport-1.4.0.gem
Successfullyinstalledactivesupport,version1.4.0
Installingridocumentationforactivesupport-1.4.0...
InstallingRDocdocumentationforactivesupport-1.4.0...
可以了。
解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错解决ubuntu上本地安装rails出错
阅读(622) | 评论(0) | 转发(0) |