Rails application generator fails after installing version 3.beta4

Hi,

I have some free time today so I am having a look at beta4 of rails3.
I am using RVM and just installed ruby version…

ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin9.8.0]

I installed rails too with no problem. When I try and generate a new
application I get the following output

~/code/rails $ rails new rails3_test --skip-git
create
create README
create Rakefile
create config.ru
create Gemfile
create app
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/views/layouts/application.html.erb
create app/models
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
/Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
railties-3.0.0.beta4/lib/rails/generators/rails/app/app_generator.rb:
22:in empty_directory_with_gitkeep': protected method empty_directory_with_gitkeep’ called for
#Rails::Generators::AppGenerator:0x4f3c4c (NoMethodError)
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
railties-3.0.0.beta4/lib/rails/generators/rails/app/app_generator.rb:
87:in lib' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta4/lib/rails/generators/rails/app/app_generator.rb: 335:in build’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
railties-3.0.0.beta4/lib/rails/generators/rails/app/app_generator.rb:
255:in create_lib_files' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ thor-0.13.6/lib/thor/task.rb:33:in run’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
thor-0.13.6/lib/thor/invocation.rb:109:in block in invoke' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ thor-0.13.6/lib/thor/invocation.rb:118:in each’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
thor-0.13.6/lib/thor/invocation.rb:118:in map' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ thor-0.13.6/lib/thor/invocation.rb:118:in invoke’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
thor-0.13.6/lib/thor/group.rb:36:in block in start' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ thor-0.13.6/lib/thor/base.rb:378:in start’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
thor-0.13.6/lib/thor/group.rb:29:in start' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta4/lib/rails/commands/application.rb:18:in <top
(required)>’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
railties-3.0.0.beta4/lib/rails/cli.rb:30:in require' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta4/lib/rails/cli.rb:30:in <top (required)>’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/
rails-3.0.0.beta4/bin/rails:2:in require' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/gems/ rails-3.0.0.beta4/bin/rails:2:in <top (required)>’
from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/bin/rails:
19:in load' from /Users/stewartmatheson/.rvm/gems/ruby-1.9.2-preview1/bin/rails: 19:in

I guessed that there was a problem with git so thats why I used skip
git. It did not work though. Any suggestions on what I am doing wrong?

I am using ruby 1.8.7, when running :
rails new rails3_test --skip-git

I have no problem with that. Are you sure that you installed rails 3
correctly including all dependencies? what happen if you try :
rails new rails3_test

I guessed that there was a problem with git so thats why I used skip
git. It did not work though. Any suggestions on what I am doing wrong?

I am not sure you are right because if it is git problem you will get
stopped at first directory creation, make sure your RVM gem list of ruby
1.9.7 contains all dependencies gem for rails 3 beta 4

Yacobus Reinhart
www.reinhartlab.com

I am running 1.9.2 not 1.9.7 but I am going to assume your talking
about 1.9.2 and its a typo :slight_smile:

ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin9.8.0]

is the version I am running.
I used RVM to install ruby 1.9.2

“rvm install 1.9.2”

All of the gems seem to be installed correctly. Here is my list

~/code/rails $ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.beta4)
actionpack (3.0.0.beta4)
activemodel (3.0.0.beta4)
activerecord (3.0.0.beta4)
activeresource (3.0.0.beta4)
activesupport (3.0.0.beta4)
arel (0.4.0)
builder (2.1.2)
bundler (0.9.26)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
erubis (2.6.5)
fastthread (1.0.7)
gem_plugin (0.2.3)
git (1.2.5)
i18n (0.4.1)
mail (2.2.4)
mime-types (1.16)
mysql (2.8.1)
nifty-generators (0.4.0)
polyglot (0.3.1)
rack (1.1.0)
rack-mount (0.6.4)
rack-test (0.5.4)
rails (3.0.0.beta4)
railties (3.0.0.beta4)
rake (0.8.7)
rdoc (2.5.8)
rubygems-update (1.3.7)
sys-proctable (0.9.0 x86-darwin-8)
thor (0.13.6)
treetop (1.4.8)
tzinfo (0.3.22)

I have tried the command with out skip git and I get the same problem.
Thanks for your reply. Anymore ideas?

I just fixed this problem. I had ruby 1.9.2 preview 1, removed it, and
installed preview 3. Everything worked fine afterward.