First some background. I am trying to run Community Engine on a fresh install of Ubuntu. CE is a open src social networking plugin running on Rails. I was able to get CE up and running on my windows box w/o issue. I have decided to use Ubuntu 8.10 as my development environment now, and am stuck on this issue. I have researched this for the last couple nights and am still stuck.
What happens is, when i get to this step of the instruction (found here):
Generate the community engine migrations:
$ script/generate plugin_migration
I get the following error:
myuser@compy:~/Projects/MyProject$ script/generate plugin_migration
/home/myuser/Projects/MyProject/config/../vendor/plugins/engines/boot.rb:4: This version of the engines plugin requires Rails 2.1.1 or later! (RuntimeError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/myuser/Projects/MyProject/config/environment.rb:12
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/myuser/Projects/MyProject/vendor/rails/railties/lib/commands/generate.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/generate:3
Here's my version of ruby:
myuser@compy:~/Projects/MyProject$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
and my installed gems:
myuser@compy:~/Projects/MyProject$ gem list
*** LOCAL GEMS ***
actionmailer (2.2.0, 2.1.2, 2.1.1)
actionpack (2.2.0, 2.1.2, 2.1.1)
activerecord (2.2.0, 2.1.2, 2.1.1)
activeresource (2.2.0, 2.1.2, 2.1.1)
activesupport (2.2.0, 2.1.2, 2.1.1)
aws-s3 (0.5.1)
builder (2.1.2)
capistrano (2.5.0)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.1)
gem_plugin (0.2.3)
haml (2.0.4)
highline (1.4.0)
hpricot (0.6.164)
htmlentities (4.0.0)
mime-types (1.15)
mongrel (1.1.5)
net-scp (1.0.1)
net-sftp (2.0.1)
net-ssh (2.0.4)
net-ssh-gateway (1.0.0)
rails (2.2.0, 2.1.2, 2.1.1) <--- clearly I have rails 2.1.1 or greater
rake (0.8.3)
RedCloth (4.1.0)
rmagick (2.7.1)
sqlite3-ruby (1.2.4)
xml-simple (1.0.11)
I got this error when i only had rails 2.1.1 as well.
Yes, I have way more gems than i need for CE, but in trying to track this down, this is what i ended up with. I have a sneaking suspicion that whatever the issue is, it's dumb and i should of caught it. But at this point, I've grown very frustrated with what was a simple process on an XP box.
I have asked this question in the Community Engine google group, however, I have a feeling that this is more related to my setup of Ruby and Rails on my machine than to CE itself.
Help would be appreciated.
This issue ended up being due to not usind sudo to install rails. I ended up blowing away ruby completely and reinstalling it. I also paid closer attention to the output of the various gems i needed to install to make sure they downloaded and ran. I was surprised to see that many of them would fail to download and had to be run a second, or even third time before they would install.
regarding Orion's suggestion, I had checked the RAILS_GEM_VERSION and it was 2.1.1 or greater. That's what was causing the most confusion with this issue since it was saying what version was needed, and then gem -v would show me the right version.