Here, we will talk about installing Ruby through apt-get, which will eliminate the need for self-compiling.
First, you must install both Ruby and ruby-dev when installing Ruby. The current version is 1.8, so you should execute the following command Java code
- Sudo apt-Get install ruby1.8 ruby1.8-dev rubygems
sudo apt-get install ruby1.8 ruby1.8-dev rubygems
This is because many plug-ins or gems depend on the stuff in Dev. For example, Ferret will use something called mkmf, which is included in Dev.
You can install rails using gem or apt-get, but we recommend the former because the version is definitely the latest. For example, if rails is not 1.2 In the source I use, it is not good to use apt-Get.
The last step is to find out where these things are installed. You can run the find command Java code in the root directory.
- Sudo find-INAME * Ruby *> result.txt
sudo find -iname *ruby* >> result.txt
The following is the running result Java code on my computer.
- ./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.
- ./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/soapw.aler/ruby_to_soap-i.yaml
- ./Usr/lib/Ruby/gems/1.8/doc/actionwebservice-1.2.3/RI/actionwebservice/protocol/soap/soapw.aler/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