Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run in ubuntu #19

Closed
jalkoby opened this issue Aug 12, 2011 · 5 comments
Closed

Can't run in ubuntu #19

jalkoby opened this issue Aug 12, 2011 · 5 comments

Comments

@jalkoby
Copy link

jalkoby commented Aug 12, 2011

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?

@jalkoby
Copy link
Author

jalkoby commented Aug 12, 2011

fixed problem by adding "cramp" file to /user/local/bin with content

#!/usr/bin/env ruby
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?

@jalkoby
Copy link
Author

jalkoby commented Aug 12, 2011

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

@lifo
Copy link
Owner

lifo commented Aug 12, 2011

That's weird :/ Are you using rvm and not loading rvm into the session by any chance ?

@jalkoby
Copy link
Author

jalkoby commented Aug 12, 2011

I don't know, but it change ruby interpretator and gem list.

@fpauser
Copy link

fpauser commented Sep 22, 2011

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.

@jalkoby jalkoby closed this as completed Sep 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants