0

Since I am new to rails and have learned the very basics from books I now figured that I can learn quite a bit more from reading other peoples code and trying to make sense of it so I have signed up at github and set up everything there. Now I read that one good open source project to learn from is radiant so I went to https://github.com/radiant/radiant and cloned it to a local directory. THen I proceeded as follows:

  1. cd radiant
  2. bundle install, which went fine
  3. rake db:migrate, which first returned:

rake aborted! You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Using bundle exec may sol

So I typed in bundle exec rake db:migrate and recieved the following:

NOTE: Gem.source_index is deprecated, use specification. It will be removed on or after 2011-11-01. Gem.source_index called from c:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails/gem_dependency Rake aborted! No such file to load -- radius

So here I am wondering how to fix this problem? I also noticed that a Gemfile and a Gemfile.lock already existed in the radiant folder when it was cloned, which perhaps could be part of the problem?

Also I wonder if it is crutial that I run the same version of rails as the project is written in?

Now it should be said that I currently have rails 3.0.5 installed and run on windows

I hope someone can help me here, it has been quite frustrating since I have not been able to run any cloned github repos (radiant here just being one example).

coreyward
  • 77,547
  • 20
  • 137
  • 166
Jason Blade
  • 373
  • 2
  • 4
  • 17

2 Answers2

0

You should edit your Gemfile and make it require newer rake. Also you can run rake db:migrate --trace to get additional error information.

0

The deprecation warning is still just a warning, and it shouldn't be causing you any issues. The part of that error that is relevant is the No such file to load -- radius. You probably need to follow the instructions for installing Radiant, which include running a gem install radiant before dropping this project code somewhere.

Bundler manages installing and using the gems in your Gemfile, and if a Gemfile.lock is present it'll use those exact versions. This means you can't run Radiant with Rails 3.0.5 since the Gemfile specifies 2.3.14. Bundler will install Rails 2.3.14 and its dependencies automatically, though, so you don't need to worry about it.

By the way, this project looks like it has been very mismanaged. It's not common for a Rails project/gem to force you to actually clone it to use it. If you want to check out a Rails 3 project to learn from, I have a slim Rails 3 app that was intended to be an API up publicly on Github with some really clean code: http://github.com/coreyward/instavibe

coreyward
  • 77,547
  • 20
  • 137
  • 166
  • thank you for taking the time to clarify it for me! I will for sure check out your app. When you say that "it is not common for a Rails project/gem to force you to actually clone it to use it" what is actually the common way? I mean don't I need to fork/clone your app to use it? (I feel that this might be a somewhat dumb question but I hope you get my sincerity to learn) – Jason Blade Oct 18 '11 at 16:45
  • No the way third-party code gets shared (for use, not for development) in Ruby is through Gems. Its not absolute, but for most things a Gem makes sense. You then can install them via `gem install [name]`, then include them by running `require 'rubygems'; require 'name'` in your Ruby. Rails itself is a Gem, even. ;) – coreyward Oct 18 '11 at 22:04