当前位置: 首页 > 工具软件 > Ferret-Ruby > 使用案例 >

在ubuntu下安装ruby需要注意的事情

葛宏爽
2023-12-01
这里说的是通过apt-get安装ruby,自己编译的情况就免了。

首先,在安装ruby本身时一定要把ruby和ruby-dev全安装了。现在的版本是1.8,因此应该执行如下命令
[code]
sudo apt-get install ruby1.8 ruby1.8-dev rubygems
[/code]
这是因为许多plugin或者gems都要依赖dev下面的东东,比如ferret就要用到一个叫mkmf的东西,后者就是包含在dev中的。

然后可以gem或者apt-get来安装rails,不过推荐前者,因为版本肯定是最新的。比如我用的源里面的rails还不是1.2的呢,用apt-get就不好了。

最后就是找找这些东东都安装在哪儿了,可以在根目录下运行find命令
[code]
sudo find -iname *ruby* >> result.txt
[/code]
下面是我电脑上的运行结果
[code]
./usr/share/doc/ruby
./usr/share/doc/ruby/ruby-policy.sgml.gz
./usr/share/doc/ruby/ruby-policy.txt.gz
./usr/share/doc/ruby/ruby-policy.html
./usr/share/doc/ruby/ruby-policy.html/ch-ruby.html
./usr/share/doc/ruby/ruby-policy.html/ap-ruby1.8_bundled_modules.html
./usr/share/doc/rubygems
./usr/share/doc/libreadline-ruby1.8
./usr/share/doc/ruby1.8-dev
./usr/share/doc/libruby1.8
./usr/share/doc/ruby1.8
./usr/share/doc/libopenssl-ruby1.8
./usr/share/doc/libgems-ruby1.8
./usr/share/doc/libgems-ruby1.8/test/data/legacy/keyedlist-0.4.0.ruby
./usr/share/gedit-2/plugins/snippets/ruby.xml
./usr/share/gtksourceview-1.0/language-specs/ruby.lang
./usr/share/man/man1/ruby1.8.1.gz
./usr/share/man/man1/ruby.1.gz
./usr/share/mime/application/x-ruby.xml
./usr/share/nano/ruby.nanorc
./usr/bin/update_rubygems
./usr/bin/ruby
./usr/bin/ruby1.8
./usr/lib/libruby1.8-static.a
./usr/lib/ruby
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/ri/Gem/Specification/to_ruby-i.yaml
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/ri/Gem/Commands/UpdateCommand/do_rubygems_update-i.yaml
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/ri/Gem/ruby-c.yaml
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/rdoc/files/lib/rubygems_rb.html
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/rdoc/files/lib/rubygems
./usr/lib/ruby/gems/1.8/doc/rubygems-0.9.4/rdoc/files/lib/rubygems/rubygems_version_rb.html
./usr/lib/ruby/gems/1.8/doc/actionwebservice-1.2.3/ri/ActionWebService/Protocol/Soap/SoapMarshaler/ruby_to_soap-i.yaml
./usr/lib/ruby/gems/1.8/doc/actionwebservice-1.2.3/ri/ActionWebService/Protocol/Soap/SoapMarshaler/soap_to_ruby-i.yaml
./usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/ruby182_test_unit_fix.rb
./usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/contrib/rubyforgepublisher.rb
./usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ruby_version_check.rb
./usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/rubyprof_ext.rb
./usr/lib/ruby/1.8/rubygems
./usr/lib/ruby/1.8/rubygems/rubygems_version.rb
./usr/lib/ruby/1.8/rubygems.rb
./usr/lib/ruby/1.8/yaml/rubytypes.rb
./usr/lib/ruby/1.8/soap/mapping/rubytypeFactory.rb
./usr/lib/ruby/1.8/wsdl/xmlSchema/xsd2ruby.rb
./usr/lib/ruby/1.8/wsdl/soap/wsdl2ruby.rb
./usr/lib/ruby/1.8/irb/ruby-token.rb
./usr/lib/ruby/1.8/irb/ruby-lex.rb
./usr/lib/ruby/1.8/i486-linux/rubyio.h
./usr/lib/ruby/1.8/i486-linux/rubysig.h
./usr/lib/ruby/1.8/i486-linux/ruby.h
./usr/lib/ruby/1.8/rubyunit.rb
./usr/lib/libruby1.8.so.1.8.5
./usr/lib/libruby1.8.so
./usr/lib/libruby1.8.so.1.8
./usr/local/lib/site_ruby
./usr/local/lib/site_ruby/1.8/rubygems
./usr/local/lib/site_ruby/1.8/rubygems/rubygems_version.rb
./usr/local/lib/site_ruby/1.8/rubygems.rb
[/code]
 类似资料: