论坛首页 入门技术论坛

在ubuntu上本地安装rails出错

浏览 3450 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-01-24  
#安装 ruby
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5p12.tar.gz

tar xzvf ruby-1.8.5.tar.gz
cd ruby-1.8.5
./configure --prefix=/usr/local/ruby
make
sudo make install
cd ..


#安装好以后,修改操作系统PATH路径,加入/usr/local/ruby/bin:
#PATH=/usr/local/ruby/bin:$PATH设置放在/etc/profile中,对全局生效


vividness@vividness-desktop:~$ ruby -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux]

#安装 ruby-zlib

wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0.6.0.tar.gz
tar zxvf ruby-zlib-0.6.0.tar.gz
cd ruby-zlib-0.6.0
/usr/local/ruby/bin/ruby extconf.rb
make
sudo make install


#安装 rubygems
wget http://rubyforge.org/frs/download.php/16452/rubygems-0.9.1.tgz
tat xzvf rubygems-0.9.1.tgz
cd rubygems-0.9.1
sudo /usr/local/ruby/bin/ruby setup.rb
cd ..


vividness@vividness-desktop:~$ gem -v
0.9.1


# 安装 Ruby on Rails
#本地安装
wegthttp://blog.sxia.net/temp/rails1.2.1.rar
或者
wget http://rubyforge.org/frs/download.php/16547/activerecord-1.15.1.gem
wget http://rubyforge.org/frs/download.php/16553/actionmailer-1.3.1.gem
wget http://rubyforge.org/frs/download.php/16556/actionwebservice-1.2.1.gem
wget http://rubyforge.org/frs/download.php/16550/actionpack-1.13.1.gem
wget http://rubyforge.org/frs/download.php/16507/activesupport-1.4.0.gem
wget http://rubyforge.org/frs/download.php/9498/rake-0.7.1.gem
wegt http://rubyforge.org/frs/download.php/16559/rails-1.2.1.gem
然后
sudo gem install activesupport-1.4.0.gem
sudo gem install activerecord-1.15.1.gem
sudo gem install actionpack-1.13.1.gem
sudo gem install actionmailer-1.3.1.gem
sudo gem install actionwebservice-1.2.1.gem
sudo gem install activeresource-0.5.0.gem  我提供的地址没有这一项
sudo gem install rake-0.7.1.gem
sudo gem install rails-1.2.1.gem

理想的结果  是rals -v
1.2.1

但是 结果确实
vividness@vividness-desktop:~/rails1.2.1$ sudo gem install activesupport-1.4.0.gem
Password:
/usr/bin/env: ruby: No such file or directory


请求 问题出在哪?

   发表时间:2007-01-24  
自己解决   自己顶 
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 的最后一行加上了
export PATH=/usr/local/ruby/bin:$PATH
并且 source /etc/profile 了

没办法
最后sudo chmod -R 777 /usr/local/ruby
然后vividness@vividness-desktop:~/rails1.2.1$ gem install activesupport-1.4.0.gem
Successfully installed activesupport, version 1.4.0
Installing ri documentation for activesupport-1.4.0...
Installing RDoc documentation for activesupport-1.4.0...
可以了
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics