debian deployment problems

hi !

I wrote you because I’ve try to install foodsoft help by the debian howto (… without success. Firstly, I’m not very familiar about ruby, so please excuse me !

I have a first problem when running “rvmsudo bundle install” (for the resque-web). It return me “/usr/bin/env: bundle: No file or directory”.

My second problem it’s about the install of foodsoft itself, it seems to miss some step to install it and configure passenger (what I must do with the foodsoft code ?).

To turnover all this problem, I think the linux turnkey was probably a more simple solution for me, so I don’t know what to do with the purposed files on the git !

Thanks for your help


Setting up the Foodsoft codebase for running in production is similar to
setting it up for development (see
). Plus:

  • Redis is required
  • Check config/environments/production.rb
  • Use passenger instead of bundle exec rails s

You are running into something related to RVM. It looks like you may
need to gem install bundle first, or perhaps you haven’t loaded RVM.
Did you do
\curl -L | bash source ~/.rvm/scripts/rvm rvm
install 2.0
(or whatever Ruby version you’d like) and reloaded the shell so it can
find RVM? As far as I know, bundle is installed by default. If not, try
gem install bundle (with RVM loaded).
I’m not familiar with rvmsudo (I think RVM discourages it’s use too).
You may want to remove RVM and reinstall it as the user foodsoft to
avoid permission problems. (*)

Hope that helps, looking forward to hearing how it goes.


  • Willem

(*) And then, if that works and you’re serious about security, you may
want to have the foodsoft application and the RVM installation owned by
another user than the user running Foodsoft. Foodcoop-adam’s capistrano
files may give you a starting-point for that (with sudo setup as
described in the Debian install log).


Many thanks for your fast reply ! Your doc was more helpfull. Now I’m
able to run foodsoft with ‘bundle exec rails s’ in dev environment.
After that, I’ve configure passenger who works fine in dev environment.
So when I switch to production environment, passenger fail because the
sql database was not create. I’ve duplicate and rename the dev database
to test, passenger stop to warn me and lauch foodsoft… without CSS ! I
think I need a command to initialize the production environment ?

About redis, I’ve never use. It’s installed on the machine, it need a
configuration ?


Hi, a quick reply to help you do the last things: production needs precompilation of assets (for performance). this is done by running:
RAILS_ENV=production rake assets:precompile
This needs to be done after each foodsoft update.
About redis, you need to install redis-server, and that should do it.

  • Willem

ps for repeating tasks, you’ll need to install a crontab. Run the command ‘whenever’ for a starting point (with RAILS_ENV set, you might need to gem install it when it cannot be found).

It solve a problem : passenger stop to talk about the nonexistant
database. So I obtain the error “Foodsoft Fehler!”. And it dosen’t
create the prod database

You can see the cause of the error in log/production.log. It may be database initialization (rake db:setup with RAILS_ENV set to production), or something else. Feel free to post the error if you get stuck.

It’s working fine ! Thanks for your help !