junebugwiki error on startup

Recently I had to restart my Junebug wiki and I'm receiving this error:

/usr/lib/ruby/gems/1.8/gems/junebug-0.0.18/lib/junebug.rb:4: undefined
method `require_gem' for main:Object (NoMethodError)
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/application.rb:159:in
`load'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/application.rb:159:in
`start_load'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/application.rb:236:in
`start'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/controller.rb:72:in
`run'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons.rb:136:in `run'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/cmdline.rb:105:in
`call'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/cmdline.rb:105:in
`catch_exceptions'
        from
/usr/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons.rb:135:in `run'
        from wiki:11

All of my gems seem to be up-to-date. Any ideas?

The reason for the problem is you don't have the latest junebug gem.

After version 0.0.18, the gem became known as 'junebug-wiki' and is
now on v0.0.37, though that version is currently slightly broken (due
to the AR 2.0 changes), and you will need to follow the instructions
in the release notes (once you have upgraded the gem) to get it to
upgrade your stylesheets, java, etc. You will probably also need to
install the specific gem versions used. If you want to generate new
junebug wikis, you will also need to edit the junebug execuatable
(probably /usr/bin/junebug ) to incorporate the line

gem 'activesupport', '<=1.4.4'

just after the "require 'rake'" line.

(The actual reason you're getting the error you are getting is because
in rubygems 1.x.x, the require_gem command became just 'gem' )

Hope this helps,
Jon

Thanks, I'm making some progress. I'm getting different errors at least
:slight_smile:

When I run rake update:everything I get:

can't activate activesupport (= 1.4.4), already activated
activesupport-2.0.2]
/usr/local/lib/site_ruby/1.8/rubygems.rb:319:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems.rb:337:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `each'
/usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems.rb:337:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `each'
...

And ruby wiki run gives:

/usr/local/lib/site_ruby/1.8/rubygems.rb:319:in `activate': can't
activate activesupport (= 1.4.4), already activated activesupport-2.0.2]
(Gem::Exception)
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:337:in `activate'
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `each'
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `activate'
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:337:in `activate'
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `each'
        from /usr/local/lib/site_ruby/1.8/rubygems.rb:336:in `activate'
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from wiki:7

What to do next?

thx
Nick

namelessjon wrote:

P.S. my /usr/bin/junebug file now looks like this:

#!/usr/bin/ruby1.8

Ah, sorry.

The release notes in the gem don't seem to include the nesessary step,
although the ones in the SVN do.
Anyway, I will reproduce the it here:

make sure your Rakefile (in the wiki directory) looks like:

$:.unshift "../lib"

require 'rubygems'
require 'rake'

gem 'activesupport', '<=1.4.4'
require 'junebug/tasks'

Then run 'rake update:everything'

That should take care of updating the wiki excutable to also include
that line (amongst other changes).

Regards,
Jon

Thanks, that did it.

Nick