Vendor/gems content

Hi everybody,

I am running Typo locally for testing and Ruby/Rails learning purposes.
I am
using Ruby Enterprise with a local mongrel for this.

Recently, I bumped the version from Ruby Enterprise from
ruby-enterprise-1.8.6-20090201 to ruby-enterprise-1.8.6-20090610 and
used
the documentation from the Wiki to pull the gems needed for Typo edge.

However, since some gems moved up in versions, I am running into this,
when
invoking script/server:

=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Exiting
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems.rb:258:in
activate': can't activate json (= 1.1.6, runtime) for [], already activated json-1.1.3 for [] (Gem::Exception) from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:inrequire’
from
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
require' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:innew_constants_in’
from
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
require' from /home/tweisser/workspace/typo/typo/vendor/gems/json-1.1.3/lib/json/ext.rb:7 from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
from
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:inrequire’
… 42 levels…
from
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
from
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from script/server:3

The problem is, that in that new Ruby installation, the json gem only
exists
in version 1.1.6 whereas in the old, working Ruby installation the same
gem
existed in version 1.1.3 and 1.1.6. I noticed that this gem also exists
in
vendor/gems. Why is that? Should that be like this?

regards,

Tobias W.

Tobias Weisserth wrote:

when invoking script/server:

[…]
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/site_ruby/1.8/rubygems.rb:258:in
`activate’: can’t activate json (= 1.1.6, runtime) for [], already
activated json-1.1.3 for [] (Gem::Exception)

Don’t you just love how rubygems fixes all versioning problems for you?

I’m not sure what depends on json-1.1.6.

The problem is, that in that new Ruby installation, the json gem only
exists in version 1.1.6 whereas in the old, working Ruby installation
the same gem existed in version 1.1.3 and 1.1.6.

Can you post the output of gem list?

I noticed that this gem also exists in vendor/gems. Why is that?

Not sure … probably an attempt to avoid this or some other dependency
problem.

Should that be like this?

I would like to get rid of the entire contents of vendor/gems, but then
again
I’m not sure if there would be any problems using json 1.1.6.

Can you try moving the json version in vendor/gems out of the way and
see what
happens?

Hi Matijs,

I moved the gem out of the way. The only thing missing now was the
bluecloth
gem which for some reason is not on the list of gems in the Wiki
documentation. Installing this in its newest version did the trick.

Everything seems to work now, I cannot detect any weird behaviour.

What do I need to do to run unit tests in Typo edge?

regards,

Tobias

Hi Tobias,

Tobias Weisserth wrote:

Hi Matijs,

I moved the gem out of the way. The only thing missing now was the
bluecloth gem which for some reason is not on the list of gems in the
Wiki documentation. Installing this in its newest version did the trick.

Running ‘rake gems’ should give you the most up-to-date list, with one
exception
(see below).

Everything seems to work now, I cannot detect any weird behaviour.

What do I need to do to run unit tests in Typo edge?

You need to install the rspec-rails gem. This is not listed in ‘rake
gems’
because adding it to the list puts typo permanently in the TEST
environment.
Once you’ve installed that, just run

rake spec

to run the tests.

Regards,

Hi everybody,

I run into these kind of problems (see thread history) a lot with
bundled
gems in Typo. I solve this by getting rid of any bundled gems in
vendor/gems
and install them manually. That fixes most problems I seem to have after
doing a git pull. Is this the intended way?

regards,

Tobias W.

On Sun, Jun 28, 2009 at 3:55 PM, Tobias Weisserth <

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs