[Radiant] JRuby installation troubles

2013-01-09 Thread Mike B
Hi all

I'm trying and failing to install radiant on top of JRuby 1.7.2 - this is 
my first bash with Ruby, and my reasons for chosing JRuby is I want to see 
if I can integrate this very nice looking radiant CMS with some of our 
existing servlets. Which no doubt will be my next question if I can clear 
the first hurdle.

Anyway, I've been having multiple issues - bluecloth failing to compile 
(managed to fix that and emailed the author) and when I finally got it 
installed and tried to run bundle exec rake production db:bootstrap as 
directed, I came up against this:

NOTE: Gem.source_index is deprecated, use Specification. It will be removed 
on or after 2011-11-01.
Gem.source_index called from 
/usr/local/rvm/gems/jruby-1.7.2/gems/rails-2.3.14/lib/rails/gem_dependency.rb:21.
rake aborted!
ERROR: 'rake/gempackagetask' is obsolete and no longer supported. Use 
'rubygems/package_task' instead.
org/jruby/RubyKernel.java:1027:in `require'
/usr/local/rvm/gems/jruby-1.7.2/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:1:in
 
`(root)'
/usr/local/rvm/gems/jruby-1.7.2/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in
 
`new_constants_in'
... stacktrace continues

Does radiant work on JRuby? Is there a specific version I need to install? 
I've been following the guide 
at https://github.com/jruby/jruby/wiki/Radiant_CMS but it's a couple of 
years old and looks like things have changed, does anyone have a more 
recent guide?

Cheers... Mike



Re: [Radiant] JRuby installation troubles

2013-01-09 Thread Mohit Sindhwani

Hi Mike,

Happy new year!  Welcome to Radiant :)

On 8/1/2013 4:04 AM, Mike B wrote:
I'm trying and failing to install radiant on top of JRuby 1.7.2 - this 
is my first bash with Ruby, and my reasons for chosing JRuby is I want 
to see if I can integrate this very nice looking radiant CMS with some 
of our existing servlets. Which no doubt will be my next question if I 
can clear the first hurdle.

Never tried with JRuby, but it would be good to hear your findings.

Anyway, I've been having multiple issues - bluecloth failing to 
compile (managed to fix that and emailed the author) and when I 
finally got it installed and tried to run bundle exec rake production 
db:bootstrap as directed, I came up against this:


NOTE: Gem.source_index is deprecated, use Specification. It will be 
removed on or after 2011-11-01.
Gem.source_index called from 
/usr/local/rvm/gems/jruby-1.7.2/gems/rails-2.3.14/lib/rails/gem_dependency.rb:21.

rake aborted!
ERROR: 'rake/gempackagetask' is obsolete and no longer supported. Use 
'rubygems/package_task' instead.

org/jruby/RubyKernel.java:1027:in `require'
/usr/local/rvm/gems/jruby-1.7.2/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:1:in 
`(root)'
/usr/local/rvm/gems/jruby-1.7.2/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in 
`new_constants_in'

... stacktrace continues


So, this error is the same as what I faced with Ruby 1.9.3 and you can 
see the rest of the thread here.

https://groups.google.com/forum/?fromgroups#!topic/radiantcms/y8quTwK7tZI

You need to force it to an older version of rake.  The rake version that 
works for me is 0.9.2.2 - I don't know how to force JRuby to install a 
particular version of a gem, so you'll have to see what to do about 
that.  On Windows, I did the steps below.


You can force install that version by doing:
cmd gem install rake -v =0.9.9.2

Once that is done, go to the directory where you have your radiant 
project.  That will have a file called Gemfile.  Open it in a text 
editor and you will see these lines near the top.

source :rubygems

# If you make any changes in this file, please run `bundle install`.
# If new versions of your installed gems are available, run `bundle 
update`


gem radiant, ~ 1.1.0
gem compass-rails, ~ 1.0.3 


Change that by adding in the specific version for rake - so the top few 
lines look like this:



source :rubygems

# If you make any changes in this file, please run `bundle install`.
# If new versions of your installed gems are available, run `bundle 
update`


gem rake, ~ 0.9.2.2
gem radiant, ~ 1.1.0
gem compass-rails, ~ 1.0.3


Now, on your command prompt, do:
cmd bundle update

and then do the necessary to bootstrap the database.

Hope this helps.

Best Regards,
Mohit.