Before you spent too much time on this text: I have not managed to complete it. Maybe you have an idea, but I failed.
With GIT arriving, 1und1 (1and1) has decided to give SSH access to its users. They call it - surprise - GIT support. Of course it’s much more than that, for example you can compile code. I tried to get Ruby on Rails running, last night. I came pretty far, but finally failed with running Ruby on Rails through CGI. As I found out later, it seems CGI is not longer supported by Rails.
First, check your ruby version:
This is fine already. Then you need to do some tricks with gem. Gem is already preinstalled, but it would put your gem into a folder which is not writeable to you. Therefore you should create a .profile in your home directory. The content might look like:
While the first entries set your path to ruby and gem, the last one adds the new commands brought by gem to the path (such as rails). If you want to run Rails with SQlite, you need to install sqlite-ruby. But unfortunately sqlite is not available on the shell. Do it yourself:
Unzip the package to a location of your choice. Then do the usual:
As you have seen, I needed to prefix everything. Otherwise I am not able to perform the install task because of missing write permissions. After that you are able to install the sqlite3-ruby gem.
Please mind the – which look like a typo. They are necessary to path the argument on to the underlying make (?) file.
Once done, we can create our application:
But we are not finished yet. 1and1 has no JS engine available which is necessary to perform some cli stuff. We need to install therubyracer:
And afterwards activate it in the Gemfile with uncommenting the following line:
Well ok, that’s it. In theory you should be able to point a domain to your public folder and see some cool Rails stuff after creating our first controller:
Older versions should support CGI, but it seems this not working any longer. If there is a chance to bring this to fly without the Apache Passenger module, let me know.
Tags: