Rails 1.1.2: Tiny fix for gems dependencies

Posted by David April 09, 2006 @ 10:12 PM

The new gem version dependency system from Rails 1.1.1 needed a few tweaks to work properly and to stop throwing meaningless warnings. This tiny release makes up for that. To install:

  • gem install rails
  • rake rails:update:configs (to get the latest config/boot.rb)

This release also signals our new commitment to do more tiny releases from the stable branch, which only gets bug fixes. So it will not be uncommon to see bi-weekly tiny releases in the 1.1.x series while we continue to add features to the forthcoming 1.2.0.

Posted in Releases | 22 comments

Comments

  1. RailsQA on 09 Apr 23:15:

    Thanks!

    Just a note to everyone that 1.1.2 also fixes a bug for Oracle users—so upgrade if you use Oracle.

    And a useful new feature for everyone:

    “Added ActionController filter_parameter_logging that makes it easy to remove passwords, credit card numbers, and other sensitive information from being logged when a request is handled”

    Love the idea of tiny bugfix releases to help us keep running our production servers on 1.1.x while we experiment on edge.

  2. DGM on 09 Apr 23:37:

    Excellent decision to maintain a stable branch.

  3. Will Rese on 10 Apr 01:34:

    I too am very glad to see a stable branch. I think this will go a long way to encourage even more developers to adopt Ruby on Rails as a viable web development framework.

    For those of you wondering if you can freeze you app to this version even though you already froze your app to a prior version, the answer is yes. But, it appears you must run the freeze command twice for this to work properly. I already submitted a bug for this (http://dev.rubyonrails.org/ticket/4674).

    In addition, you can also revert back to your previously frozen version without needing to run the command twice.

  4. jt on 10 Apr 01:41:

    About filter_parameter_logging – is it actually in Rails 1.1.2?

    I tried adding it to a controller, the application controller and a model, but I kept getting errors.

    Any hint on how to actually use this?

  5. Roderick van Domburg on 10 Apr 04:38:

    @jt: filter_parameter_logging doesn’t seem to be in Rails 1.1.2, judging from the commit logs. Just in trunk.

  6. Tim Morgan on 10 Apr 05:43:

    I suppose this is not in Rails, but rather in gems, but gem update—include-dependencies seems to loop around and install rails components multiple times. Is it possible to describe gem dependencies so as to include once only?

  7. David Heinemeier Hansson on 10 Apr 14:12:

    filter_parameter_logging is a new feature, thus its slated for 1.2.0. New releases in the Rails 1.1.x line will only contain bug fixes.

    Regarding the freezing: There is no bug from Rails 1.1.0 and onward with freezing. Will was just trying to freeze to a tag, which wasn’t support until Rails 1.1.1.

  8. Tuomas Heino on 10 Apr 17:03:

    Just couple minutes ago “gem install rails” (on a system with 1.1.1) installed 0.9.3 instead of 1.1.2.

    Any idea on what could be happening?

  9. Tuomas Heino on 10 Apr 17:37:

    As above problem was caused by corrupted source_cache (was only 200k for reason or another), renaming it out of the way was a simple cure.

    Surprisingly I got to see another bug: This weblog seems to cache the comments slightly too aggressively – it ended up serving me a version without my own comment, although the RSS and main page clearly have it. Repeated with another browser.

  10. Walter on 11 Apr 01:00:

    Sorry, extreme newbie time here:

    This line does nothing but errors for me, unless I’m just not doing it in the right directory or something obvious.

    rake rails:update:configs

    Just a hint would be nice…

  11. David Heinemeier Hansson on 11 Apr 02:44:

    Walter, you need to be in the root of the application that you want to update. And you need to have the new gems installed and if you’re binding to a specific version of Rails (in config/environment.rb), you need to update that bind.

  12. Jack D. on 11 Apr 04:37:

    rake freeze_gems still doesn’t work for me.

    Error:

    C:\InstantRails\rails_apps\myapp>rake freeze_gems (in C:/InstantRails/rails_apps/myapp) Freezing to the gems for Rails 1.1.0 rm -rf vendor/rails mkdir -p vendor/rails cd vendor/rails Unpacked gem: ‘activesupport-1.3.0’ mv activesupport-1.3.0 activesupport Unpacked gem: ‘activerecord-1.14.0’ mv activerecord-1.14.0 activerecord Unpacked gem: ‘actionpack-1.12.0’ mv actionpack-1.12.0 actionpack Unpacked gem: ‘actionmailer-1.2.0’ mv actionmailer-1.2.0 actionmailer Unpacked gem: ‘actionwebservice-1.1.0’ mv actionwebservice-1.1.0 actionwebservice ERROR: While executing gem … (ArgumentError) Illformed requirement [=#] rake aborted! exit no such file to load—C:/InstantRails/rails_apps/myapp/config/. ./vendor/rails/railtie s/lib/initializer C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require __’ C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require ‘ C:/InstantRails/rails_apps/myapp/config/boot.rb:13 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require ‘ C:/InstantRails/rails_apps/myapp/rakefile:4 C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.r b:1641:in `load_rake file’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.r b:1713:in `run’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7 C:/InstantRails/ruby/bin/rake.bat:25

  13. Ron Lusk on 12 Apr 01:03:

    Jack D: take a look at http://dev.rubyonrails.org/ticket/4518 to fix the freeze_gems problem.

  14. william on 12 Apr 02:38:

    “rake rails:update:configs” makes a lot of sense!!

  15. sb on 12 Apr 12:14:

    “rake rails:update:configs” leaves boot.rb without a final newline.

    Rails doesn’t care, but technically this is an illegal text file and might cause problems with other programs like non-Gnu diff utilities.

  16. Kevin Ballard on 13 Apr 07:41:

    sb: that’s hardly illegal, just frowned upon.

  17. Krassimir Todorov (Krassimir dot Todorov at_symbol gmail dot com) on 13 Apr 21:06:

    Hello.

    I hope this is the right place to describe my problem …

    After upgrading to Rails version 1.1.2 from rails version 1.0.0, Web Service functional tests seem broken.

    I upgraded rails (as the root user / administrator) with:
    # gem update rails --include-dependencies
    
    then I upgraded my application (as myself) with:
    ½ rake rails:update
    % rake rails:update:configs
    

    After these steps, working before Web Services functional tests broke.

    To try to isolate the problem, I scaffolded a simple Web Services Controller:

    % ./script/generate web_service Problem my_method
    

    Running the test on this Controller, I get:

    % ruby test/functional/problem_api_test.rb
    Loaded suite test/functional/problem_api_test
    Started
    E
    Finished in 0.047129 seconds.
    
      1) Error:
    test_my_method(ProblemControllerApiTest):
    NoMethodError: You have a nil object when you didn't expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.length
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:55:in `encode_rpc_call'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:36:in `prepare_request'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:9:in `invoke'
        test/functional/problem_api_test.rb:14:in `test_my_method'
    
    1 tests, 0 assertions, 0 failures, 1 errors
    

    The freshly scaffolded files are:

    • app/apis/problem_api.rb
      class ProblemApi < ActionWebService::API::Base
        api_method :my_method
      end
      
    • app/controllers/problem_controller.rb
      class ProblemController < ApplicationController
        wsdl_service_name 'Problem'
      
        def my_method
        end
      end
      
    • test/functional/problem_api_test.rb
      require File.dirname(__FILE__) + '/../test_helper'
      require 'problem_controller'
      
      class ProblemController; def rescue_action(e) raise e end; end
      
      class ProblemControllerApiTest < Test::Unit::TestCase
        def setup
          @controller = ProblemController.new
          @request    = ActionController::TestRequest.new
          @response   = ActionController::TestResponse.new
        end
      
        def test_my_method
          result = invoke :my_method
          assert_equal nil, result
        end
      end
      

    On my real application, Web Services working before tests return many more errors, like:

    % ruby test/functional/web_svc/backend_api_test.rb
    Loaded suite test/functional/web_svc/backend_api_test
    Started
    E...FF..E
    Finished in 0.557281 seconds.
    
      1) Error:
    test_find_all_softwares(WebSvc::BackendControllerApiTest):
    NoMethodError: You have a nil object when you didn't expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.length
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:55:in `encode_rpc_call'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:36:in `prepare_request'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:9:in `invoke'
        test/functional/web_svc/backend_api_test.rb:90:in `test_find_all_softwares'
    
      2) Failure:
    test_new_bad_category(WebSvc::BackendControllerApiTest) [test/functional/web_svc/backend_api_test.rb:33]:
    <RuntimeError> exception expected but none was thrown.
    

    I am using Ruby version ruby 1.8.4 (2005-12-24) [i386-linux].

    So where is the problem? What am I doing wrong?

    Thank you very much for your help!

    And of course: Thank you for the great framework!

  18. Krassimir Todorov (Krassimir dot Todorov at_symbol gmail dot com) on 13 Apr 21:07:

    Hello.

    I hope this is the right place to describe my problem …

    After upgrading to Rails version 1.1.2 from rails version 1.0.0, Web Service functional tests seem broken.

    I upgraded rails (as the root user / administrator) with:
    # gem update rails --include-dependencies
    
    then I upgraded my application (as myself) with:
    ½ rake rails:update
    % rake rails:update:configs
    

    After these steps, working before Web Services functional tests broke.

    To try to isolate the problem, I scaffolded a simple Web Services Controller:

    % ./script/generate web_service Problem my_method
    

    Running the test on this Controller, I get:

    % ruby test/functional/problem_api_test.rb
    Loaded suite test/functional/problem_api_test
    Started
    E
    Finished in 0.047129 seconds.
    
      1) Error:
    test_my_method(ProblemControllerApiTest):
    NoMethodError: You have a nil object when you didn't expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.length
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:55:in `encode_rpc_call'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:36:in `prepare_request'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:9:in `invoke'
        test/functional/problem_api_test.rb:14:in `test_my_method'
    
    1 tests, 0 assertions, 0 failures, 1 errors
    

    The freshly scaffolded files are:

    • app/apis/problem_api.rb
      class ProblemApi < ActionWebService::API::Base
        api_method :my_method
      end
      
    • app/controllers/problem_controller.rb
      class ProblemController < ApplicationController
        wsdl_service_name 'Problem'
      
        def my_method
        end
      end
      
    • test/functional/problem_api_test.rb
      require File.dirname(__FILE__) + '/../test_helper'
      require 'problem_controller'
      
      class ProblemController; def rescue_action(e) raise e end; end
      
      class ProblemControllerApiTest < Test::Unit::TestCase
        def setup
          @controller = ProblemController.new
          @request    = ActionController::TestRequest.new
          @response   = ActionController::TestResponse.new
        end
      
        def test_my_method
          result = invoke :my_method
          assert_equal nil, result
        end
      end
      

    On my real application, Web Services working before tests return many more errors, like:

    % ruby test/functional/web_svc/backend_api_test.rb
    Loaded suite test/functional/web_svc/backend_api_test
    Started
    E...FF..E
    Finished in 0.557281 seconds.
    
      1) Error:
    test_find_all_softwares(WebSvc::BackendControllerApiTest):
    NoMethodError: You have a nil object when you didn't expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.length
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:55:in `encode_rpc_call'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:36:in `prepare_request'
        /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/test_invoke.rb:9:in `invoke'
        test/functional/web_svc/backend_api_test.rb:90:in `test_find_all_softwares'
    
      2) Failure:
    test_new_bad_category(WebSvc::BackendControllerApiTest) [test/functional/web_svc/backend_api_test.rb:33]:
    <RuntimeError> exception expected but none was thrown.
    

    I am using Ruby version ruby 1.8.4 (2005-12-24) [i386-linux].

    So where is the problem? What am I doing wrong?

    Thank you very much for your help!

    And of course: Thank you for the great framework!

  19. Krassimir Todorov (Krassimir dot Todorov at_symbol gmail dot com) on 13 Apr 21:11:

    I’m sorry … As nothing changed when I submitted my text, I pressed again on the ‘Submit’ button, and now there are two similar messages :-) ...

  20. http://ip-cameras.52ddo.com on 14 Apr 07:27:

    http://ip-cameras.52ddo.com

  21. Kevin on 14 Apr 13:14:

    I’m glad to see this as well. I hate wondering whether some subtle bug I’m seeing is an unfixed rails bug, or just one of mine. Being able to make sure I’m on the latest version of bugfixes makes me feel much better. Searching trac helps too, and I’m not sure how many people know to do that…

  22. Kevin on 18 Apr 16:02:

    Odd that the scriptaculus release in this didn’t include the slider.js, builder.js or prototype.js files included in the standard prototype release…. it had me trying to figure out what went wrong with the rake update_javascripts, when it was really just not included….