1

EDIT: This seems to work on my CentOS machine but not my Ubuntu box.

$ which gem
/usr/bin/gem
$ which padrino
/usr/bin/padrino
$ which padrino-gen
/usr/bin/padrino-gen

I started playing with Sinatra but when I started thinking about some admin/authentication support I was lead to Padrino.

Problem is as follows.

I ran:

sudo gem install padrino

but then when I ran the create command, I got a command not found issue:

$ padrino g project demo-app
padrino: command not found

This seems to work in my directory where I created my heroku app because there's a gemfile there so I can run bundle exec before the padrino command. But shouldn't I be able to create a padrino project without a gemfile??

Ramy
  • 20,541
  • 41
  • 103
  • 153

4 Answers4

1

I faced the same issue and the following helped me out: Simply just restarted my terminal.

If it is not feasible in your case, try to source your .bashrc/.bash_profile.

Environment managers like rbenv, rvm unfortunately require this step.

Mark
  • 5,994
  • 5
  • 42
  • 55
0

pretty strange, try with:

sudo gem install padrino-gen

If doesn't help try to directly

padrino-gen project demo-app
DAddYE
  • 1,719
  • 11
  • 16
  • >$ sudo gem install padrino-gen >Successfully installed padrino-gen-0.10.7 >1 gem installed >Installing ri documentation for padrino-gen-0.10.7... >Installing RDoc documentation for padrino-gen-0.10.7... >$ padrino-gen project demo-app >padrino-gen: command not found – Ramy Sep 20 '12 at 13:18
  • I think there is something wrong in your env, are you using rvm or rbenv or the default system ruby? – DAddYE Sep 20 '12 at 15:11
  • I think there is something wrong in your env... post `which gem`, `which padrino`, `which padrino-gen` – DAddYE Sep 21 '12 at 16:38
  • can you try to run directly `/usr/bin/padrino-gen` ? – DAddYE Sep 24 '12 at 20:32
0

this worked for me in Ubuntu 11.04

# Setup Ubuntu LTS 10.4
sudo apt-get install ruby 
sudo apt-get install ruby-dev 
sudo apt-get install sqlite 
sudo apt-get install libsqlite3-dev
sudo apt-get install irb
sudo apt-get install rdoc
sudo apt-get install libopenssl-ruby
sudo apt-get install g++
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
>tar zxvf rubygems-1.3.6.tgz 
cd rubygems-1.3.6
sudo ruby setup.rb
sudo gem1.8 install rake rspec padrino --no-ri --no-rdoc
padrino g project foo -d activerecord -b
padrino g admin
padrino rake ar:setup

ref: https://gist.github.com/1016133

Ramy
  • 20,541
  • 41
  • 103
  • 153
0

I had this same problem, and fixed it by copying this command from the .bash_profile file which was created when I installed RVM, and adding it to the end of my .bashrc:

source "$HOME/.rvm/scripts/rvm"
Denny
  • 28
  • 1
  • 6