[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Rails on Debian?

What is the best way to deploy Rails on Debian?

I see that there has been some big advances in Ruby and Rails on
Wheezy.  That's excellent news!  I know that the upstream ruby gem
packaging architecture makes packaging for distributions quite
difficult.  Let me applaud the recent efforts to work through and
around those problems!  It is much appreciated.  I can see that it is
already much better than it was before.

But I have some questions.  I have asked the biggest umbrella question
above and of course I know the phrasing is poor but it is phrased in
the way that most people would ask it.  I know "best" is open for
debate.  But that is the question.

On Wheezy's (and Sid's) current image today:

  # apt-get install rails3
  Recommended packages:
    ruby-coffee-rails ruby-uglifier


  # apt-cache policy ruby-coffee-rails ruby-uglifier
    Installed: (none)
    Candidate: (none)
    Version table:
    Installed: (none)
    Candidate: (none)
    Version table:

And of course then:

  $ rails new foo
  run  bundle install --local
  Could not find gem 'coffee-rails (~> 3.2.1) ruby' in the gems available on this machine.

And after coffee-rails it would be uglifier right behind it if
coffee-rails were installed.  Of course that is simply the new project
creation.  If coffee-rails isn't used I can comment those out of the
bundler Gemfile.  But it still scary right at the start!  And I also
know that this is different from deploying a developed site.  There I
could "vendor everything" and avoid this too.   (I think.)

Also it looks like neither node.js nor therubyracer are available to
satisfy the the runtime requirements.

Advice?  What is the Best Practice for Rails on Debian?


P.S. Here are details that I wanted to include but knew it would make
the mail too tediously long.  But here is background on my task.

Let me say that I am fairly well versed in Rails 2.x but am not up to
speed on 3.x yet.  That is one of my tasks.  I need to understand and
migrate some Rails 2.x sites over to Rails 3.x.  In this way I am
learning as I go and some of the issues I am experiencing are due to
my inexperience and lack of knowledge with Rails 3.x.  I would
actually like to be able to deal with both version 2.x and 3.x
appropriately since I know that some sites will take some effort to
update.  But at this point let's start with Rails 3.x.

I am starting a Rails project where I will be working with some other
developers.  I am in the host driver seat and I will be using Debian
Stable for the site.  The other developers will be doing most of the
Rails development.  Meaning that they won't be understanding about the
problems of deployment on a production system.  They will be working
on their own desktop which will be other various random operating
systems.  They will simply want features that exist in the world and
it will be my task to provide those features on a good platform such
as Debian Stable, targeting Wheezy.

I have used rvm for deployments before.  I found that using rvm means
chasing an unstable version tree that is always in motion.  It also
means sometimes needing to understand rvm itself and patching shell
script problems when it is broken such as due to /bin/dash
differences.  If possible and practical I would much prefer using
system packages from the Stable release tree.  I would like to avoid
rvm on a production system.  I can set things up with rvm but I really
don't want to due to my previous experience with it.

Wheezy will soon be Stable and therefore I am starting there now.  I
would like to be able to develop and deploy Rails (both 2.x and 3.x)
on Wheezy.

Attachment: signature.asc
Description: Digital signature

Reply to: