Posts Tagged debian
Install passenger on Debian
Need packages to be able to install Passenger on Debian sid:
- ruby1.8-dev
- make
Rails 2.3 on Debian
I decided to install a new Rails environment in a VM using Debian (testing) to be able to code when I don’t have my Macbook.
This is my experience. Read the whole article before running any command you find in here.
I thought that it would be as easy as:
1 2 3 4 5 | debian~:# aptitude install ruby rubygems debian~:# gem install rails debian~:# rails myapp debian~:# cd myapp debian~:# ./script/server |
But the result was not as expected:
1 | Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. |
Well, let’s do as told:
1 2 3 | debian:~/myapp# gem update --system ERROR: While executing gem ... (RuntimeError) gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get. |
No good… What now? Let’s google it. Yeah there is a gem that allows you to update rubygems to the latest version:
1 2 3 4 | debian:~/myapp# gem install rubygems-update debian:~/myapp# update_rubygems debian:~/myapp# gem install rails debian:~/myapp# ./script/server |
Voila! (almost)
Did we need to reinstall the Rails gem? Well, yeah… Debian’s version of rubygems stores his stuff in the /var/lig/gems folder while this new updated version stores in /usr/lib/ruby(…).
A good thing with this rubygems installation is that we do not need to edit the path anymore as the bin (rails…) are now in the /usr/bin folder.
Now that we have solved the rubygems version problem, let see what problem is showing now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | debian:~/myapp# ./script/server => Booting WEBrick => Rails 2.3.2 application starting on http://0.0.0.0:3000 /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:269:in `require_frameworks': no such file to load -- net/https (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:134:in `process' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run' from /root/myapp/config/environment.rb:9 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from ./script/server:3 |
net/http??? Google, my friend, what’s going on? After finding articles about recompiling ssl, i found this solution, much more convinient:
1 2 | debian:~myapp/# aptitude install libopenssl-ruby1.8 debian:~/myapp# ./script/server |
Voilà!!! It’s working at last! I must admit that I am a little desapointed. I thought it would be much easier to have rails 2.3 running on debian.
My next step is to have Vim configured so it would be very close to using Textmate!