Closed jalkoby closed 13 years ago
fixed problem by adding "cramp" file to /user/local/bin with content
require 'rubygems' require 'cramp' require 'cramp/generators/application'
if ['--version', '-v'].include?(ARGV.first) puts "Cramp #{Cramp::VERSION}" exit(0) end
if ARGV.first != "new" ARGV[0] = "--help" else ARGV.shift end
Cramp::Generators::Application.start
It's normal practice or i need fix some system's issues?
Or even better
#!/usr/bin/env ruby
require 'rubygems'
require 'cramp'
require 'cramp/generators/application'
case ARGV.first
when "new"
ARGV.shift
Cramp::Generators::Application.start
when 's', 'server'
unless File.exist? 'config.ru'
puts "Missing configuration of application!!!"
end
require 'thin'
Thin::Runner.new(%w[--timeout 0 -R config.ru start]).run!
when '--version', '-v'
puts "Cramp #{Cramp::VERSION}"
when '--help', '-h'
Cramp::Generators::Application.start
else
puts 'Use -h, --help for help'
end
That's weird :/ Are you using rvm and not loading rvm into the session by any chance ?
I don't know, but it change ruby interpretator and gem list.
I am using cramp with ruby-1.9.2-p290 in Ubuntu-11.04 and cramp new <project>
runs without problems.
Maybe your rvm-ruby-1.9.2 is somehow "broken"? You could try to rvm get head
or rvm update --head
(if its an older rvm-installation) and rvm reinstall ruby-1.9.2
.
I had installed rvm in my Ubuntu 11.04. I create ruby 1.9.2 for cramp. Then i run gem install cramp It installed cramp's gem and dependent gems. But when I run "cramp new my_site" it falled with error "cramp: command not found". Maybe I need include some additional path to my $PATH variable?