Wow, Rails 3.0 beta gem is out but, but the instruction advertised on the blog doesn't work on Ubuntu Linux and the older one too :(
Here is an hacky but working way to install Rails 3 on a clean Ubuntu installation.

(replace pre with beta)
sudo apt-get install ruby1.9-dev libsqlite3-dev rdoc1.9 libopenssl-ruby1.9 giggle
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar -xvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby1.9 setup.rb
sudo ln -s /usr/bin/ruby1.9 /usr/bin/ruby
sudo ln -s /usr/bin/gem1.9 /usr/bin/gem
Now the ruby and the gem environment is ready and you'll have fun with the new rails' dependencies. The faster way to get them is via rails3b
sudo gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n sqlite3-ruby
sudo gem install rails --pre
The "theoretical" installation is finished and you should be able to start a new application almost as in rails 2.x
rails myapp
cd myapp
rails server
# go to localhost:3000
<internal:gem_prelude>:114:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
You need to set up the GEM_HOME variable
export GEM_HOME=/usr/lib/ruby1.9/gems/1.9.0
undefined method `default_external=' for Encoding:Class (NoMethodError)
Comment the line that contains it.
require': no such file to load -- ftools (LoadError)
sudo apt-get install rpl
cd /usr/lib/ruby1.9/gems/1.9.0/gems/
sudo rpl -R "require 'ftools'" "" *
other issues with the bin path
# put this lines in $HOME/.bashrc
export GEM_HOME=/usr/lib/ruby1.9/gems/1.9.0
export PATH=$PATH:/usr/lib/ruby1.9/gems/1.9.0/gems/railties-3.0.0.beta/bin
Be careful that you may reapply these fixes if you update some gems!
Commenti recenti
1 giorno 11 hours fa
1 giorno 13 hours fa
2 days 12 hours fa
2 days 14 hours fa
4 days 23 hours fa
5 days 1 ora fa
1 settimana 4 days fa
1 settimana 5 days fa
2 weeks 22 hours fa
2 weeks 23 hours fa