Forum: Ruby on Rails Can't run tests using ruby 1.9.0 and rails 2.1.2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
407016c9d4109e726fc30681b21324cc?d=identicon&s=25 Jarl Friis (jarl)
on 2008-11-12 12:32
I have just created my first rails app
After having modified the generator script (see
http://rails.lighthouseapp.com/projects/8994/ticke...
)
I have created controller and I now try to run the generated test, so I
do:

ruby -Itest test/functional/kml_controller_test.rb but I get

But it fails with the below message.

Any help is appriciated.

/var/lib/gems/1.9.0/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:
warning: nested repeat operator + and ? was replaced with '*'
Loaded suite test/functional/kml_controller_test
Started
/usr/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:94:in `sub!':
can't modify frozen string (RuntimeError)
        from
/usr/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:94:in
`test_started'
        from /usr/lib/ruby/1.9.0/test/unit/util/observable.rb:78:in
`call'
        from /usr/lib/ruby/1.9.0/test/unit/util/observable.rb:78:in
`block in notify_listeners'
        from /usr/lib/ruby/1.9.0/test/unit/util/observable.rb:78:in
`each'
        from /usr/lib/ruby/1.9.0/test/unit/util/observable.rb:78:in
`notify_listeners'
        from
/usr/lib/ruby/1.9.0/test/unit/ui/testrunnermediator.rb:47:in `block in
run_suite'
        from
/var/lib/gems/1.9.0/gems/activesupport-2.1.2/lib/active_support/testing/setup_and_teardown.rb:28:in
`run_with_callbacks'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:34:in `block in
run'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in `each'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in `run'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:34:in `block in
run'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in `each'
        from /usr/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in `run'
        from
/usr/lib/ruby/1.9.0/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
        from
/usr/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:67:in
`start_mediator'
        from
/usr/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:41:in `start'
        from
/usr/lib/ruby/1.9.0/test/unit/ui/testrunnerutilities.rb:29:in `run'
        from /usr/lib/ruby/1.9.0/test/unit/autorunner.rb:216:in `run'
        from /usr/lib/ruby/1.9.0/test/unit/autorunner.rb:12:in `run'
        from /usr/lib/ruby/1.9.0/test/unit.rb:278:in `block in <top
(required)>'
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-11-12 13:15
(Received via mailing list)
On 12 Nov 2008, at 11:32, Jarl Friis wrote:

>
> I have just created my first rails app
> After having modified the generator script (see
> 
http://rails.lighthouseapp.com/projects/8994/ticke...
> )
> I have created controller and I now try to run the generated test,
> so I
> do:

ruby 1.9 is somewhat in flux. You'll want to be on edge rails to use it.

Fred
407016c9d4109e726fc30681b21324cc?d=identicon&s=25 Jarl Friis (jarl)
on 2008-11-12 15:12
Frederick Cheung wrote:
> On 12 Nov 2008, at 11:32, Jarl Friis wrote:
>
>>
>> I have just created my first rails app
>> After having modified the generator script (see
>> 
http://rails.lighthouseapp.com/projects/8994/ticke...
>> )
>> I have created controller and I now try to run the generated test,
>> so I
>> do:
>
> ruby 1.9 is somewhat in flux. You'll want to be on edge rails to use it.

Sorry english is not my native language and I am completely new ruby AND
rails. What do you mean that ruby 1.9 is in flux.

By "You'll want to be on edge rails to use it." I guess you mean that
using the latest rails gem is not new enough to run stable on ruby 1.9,
it might be necessary to run a nightly rails bulid, is that true?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-11-12 15:21
(Received via mailing list)
On 12 Nov 2008, at 14:12, Jarl Friis wrote:

>>> so I
>>> do:
>>
>> ruby 1.9 is somewhat in flux. You'll want to be on edge rails to
>> use it.
>
> Sorry english is not my native language and I am completely new ruby
> AND
> rails. What do you mean that ruby 1.9 is in flux.
>
It's changing. (and the latest is the 1.9.1 preview). Rails has been
tracking it as best as it can, but the 2.1 branch was stabilised quite
a while back
>

> By "You'll want to be on edge rails to use it." I guess you mean that
> using the latest rails gem is not new enough to run stable on ruby
> 1.9,
> it might be necessary to run a nightly rails bulid, is that true?

Yes. (the 2.2 release candidate is probably ok too)

Fred
407016c9d4109e726fc30681b21324cc?d=identicon&s=25 Jarl Friis (jarl)
on 2008-11-12 19:54
Thanks for the response.

Frederick Cheung wrote:
> On 12 Nov 2008, at 14:12, Jarl Friis wrote:
>
>>>> so I
>>>> do:
>>>
>>> ruby 1.9 is somewhat in flux. You'll want to be on edge rails to
>>> use it.
>>
>> Sorry english is not my native language and I am completely new ruby
>> AND
>> rails. What do you mean that ruby 1.9 is in flux.
>>
> It's changing. (and the latest is the 1.9.1 preview). Rails has been
> tracking it as best as it can, but the 2.1 branch was stabilised quite
> a while back

Changing??? 1.9.0 is a frozen released piece of software. development is
going on for the next release 1.9.1, so I am a bit confused.

A while back??? As far as I understand Ruby 1.9.0 was released
2007-12-25 and Rails 2.1.0 was released 2008-05-31 and rails 2.1.{1,2}
even later, so is there a reason why rails 2.1.{0,1,2} was not
stabalised on the latest (at time of release) stable ruby (which was
1.9.0 for all three rails releases)

Does that mean that I shouldn't expect 2.1.x series to be running on
ruby 1.9.0 at all? and what about 2.2.x series.

Jarl
171ea139761951336b844e708d1547ab?d=identicon&s=25 James Byrne (byrnejb)
on 2008-11-12 20:30
Jarl Friis wrote:

>
> Changing??? 1.9.0 is a frozen released piece of software. development is
> going on for the next release 1.9.1, so I am a bit confused.
>

Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1:

    This is a preview release of Ruby 1.9.1, which will be the first
stable version of the Ruby 1.9 series.

Ruby 1.9.0 was a developmental release only.  That was always made quite
clear.

> A while back??? As far as I understand Ruby 1.9.0 was released
> 2007-12-25 and Rails 2.1.0 was released 2008-05-31 and rails 2.1.{1,2}
> even later, so is there a reason why rails 2.1.{0,1,2} was not
> stabalised on the latest (at time of release) stable ruby (which was
> 1.9.0 for all three rails releases)

Yes, there is a reason. Ruby 1.9.0 was not stable.  Rails 2.1.x is based
upon Ruby 1.8.6+ (I think, it actually might be 1.8.4+ and skipped 1.8.5
for some reason).

>
> Does that mean that I shouldn't expect 2.1.x series to be running on
> ruby 1.9.0 at all? and what about 2.2.x series.

Once Ruby 1.9.1+ is finally released as a stable production version then
Rails 2.2.x will, no doubt, support it (or vice versa) but until then
only the the development version of Rails is likely to track anywhere
near 1.9.x.  I should not think it worth the trouble to develop a Rails
app under Ruby 1.9.x at the moment unless you are purposely
experimenting with Ruby itself.
407016c9d4109e726fc30681b21324cc?d=identicon&s=25 Jarl Friis (jarl)
on 2008-11-13 09:30
James Byrne wrote:
>
> Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1:
>
>     This is a preview release of Ruby 1.9.1, which will be the first
> stable version of the Ruby 1.9 series.
>
> Ruby 1.9.0 was a developmental release only.  That was always made quite
> clear.
>

Thank you very much for this extra information, it was not found in the
release announcement:
http://www.ruby-lang.org/en/news/2007/12/25/ruby-1...

That explains everything. I fully understand rails developers standpoint
on ruby 1.9.x series now.

Again, thanks.

Jarl
This topic is locked and can not be replied to.