This project is archived and is in readonly mode.

#3552 ✓invalid
Glenn Rempe

Running 'rails foo' under Ruby 1.9.1 fails w/ undefined method `camelize' for "app":String

Reported by Glenn Rempe | December 8th, 2009 @ 07:42 PM

This simple test passes with Ruby 1.8.7 (rvm), but fails with 1.9.1.

Example, trying to create a new rails app in the /tmp dir:

glenn@macbook-pro /tmp[ruby-1.9.1]$ rails foo
undefined method `camelize' for "app":String

Environment:

  • Ruby 1.9.1 installed with rvm (ruby-1.9.1-p376 [x86_64])

Gems:

glenn@macbook-pro /tmp[ruby-1.9.1]$ gem list

LOCAL GEMS

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bundler (0.7.1)
ffi (0.5.4)
gemcutter (0.2.0)
git (1.2.5)
jeweler (1.4.0)
json_pure (1.2.0)
mocha (0.9.8)
mysql (2.8.1)
net-scp (1.0.2)
net-ssh (2.0.16)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rubyforge (2.0.3)
rubygems-update (1.3.5)
sqlite3 (0.0.3)
test-spec (0.10.0)
test-unit (2.0.5)
xml-simple (1.0.12)
yard (0.4.0)

Comments and changes to this ticket

  • José Valim

    José Valim January 3rd, 2010 @ 12:37 AM

    I cannot reproduce here:

    ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-darwin10.2.0]

  • Conrad Taylor

    Conrad Taylor January 3rd, 2010 @ 02:08 AM

    I was unable to reproduce on the following platforms using Ruby 1.9.1p376:

    Mac OS 10.5.8 (PPC)
    Mac OS 10.6.2 (Intel)

  • Glenn Rempe

    Glenn Rempe January 3rd, 2010 @ 02:25 AM

    I was still able to reproduce using an rvm installed 1.9.1 p243. So I uninstalled rvm entirely (rvm implode) and started from scratch. I still get the same results, but only with 1.9.1 builds.

    I googled for the error and there are a number of related reports going back a couple of years which are identical to my report. Some of these suggest installing ruby-iconv to fix the problem. Most of these reports seem related to BSD or Cygwin installs (I am on OS X 10.6).

    http://bit.ly/6sJIsf

    So this may not be a new issue, but perhaps related to how rvm is compiling ruby 1.9.1 and rails doesn't fail gracefully?

  • Mikel Lindsaar

    Mikel Lindsaar January 3rd, 2010 @ 08:21 AM

    Do check if your iconv library is all good.

    If it is not, you might have problems as a common way to regex strings in 1.9 is to convert them to 8-bit ascii first, this requires iconv.

    Do you get this output?

     $ rvm ruby-1.9.1-head
     $ irb
    irb(main):001:0> require 'iconv'
    => true
    irb(main):002:0> Iconv.conv('US-ASCII', 'UTF-8', 'Hello')
    => "Hello"
    irb(main):003:0> exit
    

    Mikel

  • Glenn Rempe

    Glenn Rempe February 3rd, 2010 @ 08:23 PM

    I have found the solution to this error, and it is in fact related to iconv. Here is the solution for fixing it when installing ruby 1.9.x using RVM:

    http://exceptionz.wordpress.com/2010/02/03/how-to-fix-the-iconv-req...

    (please also note my comment for the proper command line as his wordpress blog is messing with the formatting.)

    Installing Ruby 1.9.x using RVM requires first installing a new vanilla iconv and readline within the rvm install, and then telling rvm to use that version when compiling, and not the version that comes with snow leopard. I suspect this will bite many people as rvm and 1.9.x become more popular.

    You may close bug this if you like as it is environment specific (unless rails would be able to test and warn if an improper install of iconv is present, which would be great).

    Thanks for the help pointing me towards the probable solution.

  • José Valim

    José Valim February 4th, 2010 @ 01:09 PM

    • State changed from “new” to “invalid”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages