rake init fails
-
Jonas
Same issue here. Rake fails and sinatra server never starts.
-
Craig Bugzefsky
See above my reply to original reporter.
I suspect the "rake" command does not match the "gem" command you uses to install the gems. That error is literally rake not finding the Ralex gem.
-
Craig Bugzefsky
- State changed from new to open
Oh, and be sure that you installed the Ralex-0.1.gem and matano_utils.gem that are in the root directory of the flint project. I had assumed you did this when I replied above.
To do so, while in flint root dir:
gem install ./Ralex-0.1.gem gem install ./matasano_utils-0.1.gem -
Mike Johnson
Yup, that was what I did. But just to be sure, I blew away the root dir and tried again (and I tried again after fixing the PATH issue, no difference):
mike@mike-linux:~/Downloads/flint-1.0$ pwd /home/mike/Downloads/flint-1.0 mike@mike-linux:~/Downloads/flint-1.0$ gem install ./matasano_utils-0.1.gem WARNING: Installing to ~/.gem since /var/lib/gems/1.9.1 and /var/lib/gems/1.9.1/bin aren't both writable. WARNING: You don't have /home/mike/.gem/ruby/1.9.1/bin in your PATH, gem executables will not run. Successfully installed matasano_utils-0.1 1 gem installed Installing ri documentation for matasano_utils-0.1... Updating class cache with 333 classes... Installing RDoc documentation for matasano_utils-0.1... mike@mike-linux:~/Downloads/flint-1.0$ gem install ./matasano_utils-0.1.gem WARNING: Installing to ~/.gem since /var/lib/gems/1.9.1 and /var/lib/gems/1.9.1/bin aren't both writable. WARNING: You don't have /home/mike/.gem/ruby/1.9.1/bin in your PATH, gem executables will not run. Successfully installed matasano_utils-0.1 1 gem installed Installing ri documentation for matasano_utils-0.1... Updating class cache with 333 classes... Installing RDoc documentation for matasano_utils-0.1... mike@mike-linux:~/Downloads/flint-1.0$ rake init --trace (in /home/mike/Downloads/flint-1.0) rake aborted! no such file to load -- ralex/ralextask.rb /home/mike/Downloads/flint-1.0/rakefile.rb:1:in `require' /home/mike/Downloads/flint-1.0/rakefile.rb:1 /usr/lib/ruby/1.8/rake.rb:2359:in `load' /usr/lib/ruby/1.8/rake.rb:2359:in `raw_load_rakefile' /usr/lib/ruby/1.8/rake.rb:1993:in `load_rakefile' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1992:in `load_rakefile' /usr/lib/ruby/1.8/rake.rb:1976:in `run' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1974:in `run' /usr/bin/rake:28 mike@mike-linux:~/Downloads/flint-1.0$ ls app checks COPYING doc lib matasano_utils-0.1.gem rakefile.rb Ralex-0.1.gem README script spec -
Craig Bugzefsky
Please note:
From your gem install
> WARNING: Installing to ~/.gem since /var/lib/gems/1.9.1 and > /var/lib/gems/1.9.1/bin aren't both writable. > WARNING: You don't have /home/mike/.gem/ruby/1.9.1/bin in your PATH,That indicated your "gem" program is from your 1.9 ruby
From your "rake" run:
> /home/mike/Downloads/flint-1.0/rakefile.rb:1:inrequire' > /home/mike/Downloads/flint-1.0/rakefile.rb:1 > /usr/lib/ruby/1.8/rake.rb:2359:inload'Rake is running your 1.8 ruby install.
That is evidence that your gem is from 1.9 and your ruby is 1.8
-
Mike Johnson
Please bare with me, I'm not a ruby guy. I fixed the symlink that was calling ruby 1.8 and told it to call 1.9:
mike@mike-linux:~/Downloads/flint-1.0$ rake init --trace (in /home/mike/Downloads/flint-1.0) rake aborted! no such file to load -- ralex/ralextask.rb /home/mike/Downloads/flint-1.0/rakefile.rb:1:in `require' /home/mike/Downloads/flint-1.0/rakefile.rb:1:in `<top (required)>' /usr/lib/ruby/1.9.1/rake.rb:2341:in `load' /usr/lib/ruby/1.9.1/rake.rb:2341:in `raw_load_rakefile' /usr/lib/ruby/1.9.1/rake.rb:1977:in `block in load_rakefile' /usr/lib/ruby/1.9.1/rake.rb:2028:in `standard_exception_handling' /usr/lib/ruby/1.9.1/rake.rb:1976:in `load_rakefile' /usr/lib/ruby/1.9.1/rake.rb:1961:in `block in run' /usr/lib/ruby/1.9.1/rake.rb:2028:in `standard_exception_handling' /usr/lib/ruby/1.9.1/rake.rb:1959:in `run' /usr/bin/rake:28:in `<main>' -
Craig Bugzefsky
Is this ubuntu?
It could be that your ruby does not put your gem directories in it's ruby library path. try putting:
require 'rubygems'
at the top of rakefile.rb.
If that works, then we'll need to add that to app/app.rb and script/init.rb and a bunch of other places as well.
-
Mike Johnson
Yup, it's ubuntu. That didn't seem to help:
mike@mike-linux:~/Downloads/flint-1.0$ head rakefile.rb require 'ralex/ralextask.rb' require 'rubygems'require' /home/mike/Downloads/flint-1.0/rakefile.rb:1:in<top (required)>' /usr/lib/ruby/1.9.1/rake.rb:2341:in
mike@mike-linux:~/Downloads/flint-1.0$ rake init --trace (in /home/mike/Downloads/flint-1.0) rake aborted! no such file to load -- ralex/ralextask.rb /home/mike/Downloads/flint-1.0/rakefile.rb:1:inload' /usr/lib/ruby/1.9.1/rake.rb:2341:inraw_load_rakefile' /usr/lib/ruby/1.9.1/rake.rb:1977:inblock in load_rakefile' /usr/lib/ruby/1.9.1/rake.rb:2028:instandard_exception_handling' /usr/lib/ruby/1.9.1/rake.rb:1976:inload_rakefile' /usr/lib/ruby/1.9.1/rake.rb:1961:inblock in run' /usr/lib/ruby/1.9.1/rake.rb:2028:instandard_exception_handling' /usr/lib/ruby/1.9.1/rake.rb:1959:inrun' /usr/bin/rake:28:in<main>'</code> </pre> -
Craig Bugzefsky
Yah gotta make it the first line.
That loads up the rubygems lib, and that should add your personal .gems subdirs to the path.
I bet that is it BTW. Apparently the OSX ruby puts them in the path by default, which is why I didn't catch this earlier. I've fixed this in the git repo already.
-
jth
I had a different source to the same error (rake init failed). Turns out I had multiple copies of ruby. Running "which ruby" and "which gem" to make sure both looked sane (and some additional use of 'locate' to verify), I re-did the setup from the start. The only change I had to make was to also run 'gem install ruby-debug' for it all to work.
So in total, I did the following, which worked out once I realized my path was ordered to grab the macports-installed ruby over the system's ruby, which I fixed:
git clone http://runplaybook.com/git/flint.git
cd flint/
gem install sinatra haml ohm rdiscount compass bcrypt-ruby ruby-debug ./*.gem
(install redis - on my mac with macports already present, # port selfupdate && port install redis)
redis-server & rake init & rake app
-
jth
ack! hash doesn't show up correctly. Sorry for all the headings there...
-
Mike Johnson
Oooookay, got it to start.
I removed the ruby1.9.1 packages (including 1.9.1 gem) and made sure to have all the ruby1.8 (turns out on ubuntu you need the right ruby-dev package too, to install gem modules).
I did a fresh clone from git (which has the new require statements).
I made sure my path was right.
I wiped my old $HOME/.gem
And rake --init works now. For grins, I removed the "require 'rubygems'" from rakefile.rb just to make sure that was the problem, and sure enough, rake won't start without that line.
Thanks for the help!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.