[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

specifying a gem version

Brian Mr.

12/4/2006 5:11:00 PM

I'm new to ruby so I have no clue what I'm doing yet here. I downloaded
active_merchant code and attempted to run some tests using
active_support 1.3.1. That work just fine for me. I upgraded rails to
1.2rc1 and it then downloaded active_support 1.3.1.5618. When I attempt
to run the same tests now with active_support I'm getting an error
because of the new version of active support. I was thinking I could
just specify the older version of active_support and all would be well
but that doesn't seem to be working. Instead of doing:

begin
require 'active_support'
rescue LoadError
require 'rubygems'
require_gem 'activesupport'
end

I changed this to:

begin
require 'rubygems'
require_gem 'activesupport', '<=1.3.1'
rescue LoadError
require 'rubygems'
require_gem 'activesupport'
end

I also tried just putting in require_gem 'activesupport', '1.3.1' with
no luck. The error I get is something like 'mattr_accessor' is
undefined. I've read that you can specify the version of a gem so I
must be doing something stupid here. I have put in a ticket on the
rails list about this issue with activesupport but I was hoping to work
around the issue til it was fixed. Thanks in advance.

--
Posted via http://www.ruby-....

3 Answers

David Vallner

12/4/2006 10:34:00 PM

0

Brian Mr. wrote:
> I'm new to ruby so I have no clue what I'm doing yet here. I downloaded
> active_merchant code and attempted to run some tests using
> active_support 1.3.1. That work just fine for me. I upgraded rails to
> 1.2rc1 and it then downloaded active_support 1.3.1.5618. When I attempt
> to run the same tests now with active_support I'm getting an error
> because of the new version of active support. I was thinking I could
> just specify the older version of active_support and all would be well
> but that doesn't seem to be working. Instead of doing:
>
> begin
> require 'active_support'
> rescue LoadError
> require 'rubygems'
> require_gem 'activesupport'
> end
>
> I changed this to:
>
> begin
> require 'rubygems'
> require_gem 'activesupport', '<=1.3.1'
> rescue LoadError
> require 'rubygems'
> require_gem 'activesupport'
> end
>
> I also tried just putting in require_gem 'activesupport', '1.3.1' with
> no luck. The error I get is something like 'mattr_accessor' is
> undefined. I've read that you can specify the version of a gem so I
> must be doing something stupid here. I have put in a ticket on the
> rails list about this issue with activesupport but I was hoping to work
> around the issue til it was fixed. Thanks in advance.
>

Do you -need- the newer version of AS or are you just chasing higher
version numbers? Or did rails pick up the incompatible version as a
dependency?

If the former is the case, wipe clean, and just use the version rails
asks for. If the latter, if that's somehow Rails-specific code, maybe
the activesupport gem was already loaded at the bad version before by
the test launcher, I don't think different gem versions can at all run
side-by-side.

David Vallner

MCP

3/16/2013 10:16:00 AM

0

On 15/03/2013 07:30, MCP wrote:
> On 2013-03-15 02:31 AM, MCP wrote:
>>>
>>>
>>>
>>>
>> Complaints-To: abuse@aioe.org
>
>
>
> Complaints-To: http://netreport.virgi...
>
Complaints-To: abuse@aioe.org

MCP

3/16/2013 3:12:00 PM

0

On 2013-03-16 06:15 AM, MCP wrote:
> On 15/03/2013 07:30, MCP wrote:
>> On 2013-03-15 02:31 AM, MCP wrote:
>>>>
>>>>
>>>>
>>>>
>>> Complaints-To: abuse@aioe.org
>>
>>
>>
>> Complaints-To: http://netreport.virgi...
>>
> Complaints-To: abuse@aioe.org

Complaints-To: http://netreport.virgi...