How to solve "uninitialized constant Dependencies" error in rake?
I am trying to build Noosfero (http://noosfero.org/), a project done in Ruby, but I am pretty new in Ruby and Linux (my current environment). I am following the instructions in their tutorial (http://gitorious.org/noosfero/noosfero/blobs/master/INSTALL and http://gitorious.org/noosfero/noosfero/blobs/master/HACKING).
I was supposed to run an apt-get install with many packages, everything worked except for libgettext-ruby-data, to which I get a message that "E: Package libgettext-ruby-data has no installation candidate".
I then download the source and try to run "rake db:schema:load", which I get the following error:
"rake aborted! uninitialized constant Dependencies /home/user/noosfero/Rakefile:10"
My rake file is the following:
require(File.join(File.dirname(FILE), 'config', 'boot'))
require 'rake' require 'rake/testtask' require 'rake/rdoctask'
require 'tasks/rails' #this is the line that the dependency can't be found
I searched around and found this question here: Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) , but changing the config files didn't help and I could wasn't able to downgrade my RubyGems because I do not know how to do that (gem -update returns a message that I have to do that using apt-get, but I can't find out in which package the gem program is).
The first time I run Rake, I get a message saying: "I: Installing Debian-installed Rails from /usr/share/rails into vendor/rails. I: Please note that the recommended Rails version is 2.1.0, and that other versions might not work"
But I don't know how to downgrade my Rail开发者_如何转开发s version.
I've got many paths to follow, so I've got many questions, I hope you can help me:
1- Does anyone knows how to fix it directly? 2- How can I downgrade Gems? 3- How can I downgrade Rails? 4- Where can I download gems and how can I install it? (The documentation provides a link, but this link is VERY strange: http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext ).
Any help is very appreciated.
Thanks, Oscar
Edit: can this error be a problem in the project I downloaded and not in my environment? After some research I am starting to think it is, can it be?
It would help if you share your rake version, by the way.
In the meantime, take a look at this:
https://github.com/jimweirich/rake/issues/33
(Only valid for rake 0.9.0, though).
This was a version conflict I had with the project I was trying to build, not it is solved :)
First of all, I'm a Noosfero developer and I need to admit that the process of preparing the environment to run Noosfero right now is pretty nasty (unless you only want to run it in the production mode since we've got a debian package). But this problem is close to an end since we're a building a vagrant box (for more info see http://vagrantup.com/) to noosfero. Things are going to be much better. But regardless all this nastiness and not having the box yet, Noosfero was supposed to run if you followed all the steps in the INSTALL instructions. Let me try to help you.
Are you using Rails 2.1.0? The best way to do so is to uninstall rails from your system (if you installed through apt-get) and install through rubygems:
gem install rails -v=2.1.0
To avoid problems ensure that there isn't any other version of rails installed through rubygems (gem list
).
If you still having problems to run the schema load, run it with --trace and post it here. If you have other problems you can try contacting us through noosfero-dev@listas.softwarelivre.org or the irc #noosfero at FreeNode.
精彩评论