This project is archived and is in readonly mode.
Error creating Rails 3.0.pre Application
Reported by Conrad Taylor | January 28th, 2010 @ 08:30 PM | in 3.0.2
$ git clone git://github.com/rails/rails.git
$ cd rails
$ gem bundle --only default
$ ruby railties/bin/rails ../new_app --dev
The last line above generated the following error message:
/home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:231:in `eval': (eval):5: syntax error, unexpected tLABEL (SyntaxError)
--- !ruby/object:Gem::Specification
^
(eval):6: syntax error, unexpected ':', expecting $end
name: nifty-generators
^
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:231:in `block in locate_gemspecs'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:229:in `each'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:229:in `inject'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:229:in `locate_gemspecs'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/source.rb:214:in `gems'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/resolver.rb:86:in `block in initialize'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/resolver.rb:85:in `each'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/resolver.rb:85:in `initialize'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/resolver.rb:47:in `new'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/resolver.rb:47:in `resolve'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/bundle.rb:93:in `install'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/cli.rb:40:in `bundle'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/cli.rb:85:in `run'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/cli.rb:6:in `run'
from /home/conradwt/.rvm/gems/ruby-head/gems/bundler-0.8.1/lib/bundler/commands/bundle_command.rb:68:in `execute'
from /home/conradwt/.rvm/rubies/ruby-head/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:257:in `invoke'
from /home/conradwt/.rvm/rubies/ruby-head/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:132:in `process_args'
from /home/conradwt/.rvm/rubies/ruby-head/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:102:in `run'
from /home/conradwt/.rvm/rubies/ruby-head/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in `run'
from /home/conradwt/.rvm/rubies/ruby-head/bin/gem:24:in `<main>'
Lastly, I have the following configuration:
Ubuntu 9.10 (32 Bit)
ruby 1.9.2dev (2010-01-25 trunk 26397) [i686-linux]
Comments and changes to this ticket
-
Prem Sichanugrist (sikachu) February 11th, 2010 @ 03:43 PM
- Assigned user set to Prem Sichanugrist (sikachu)
Do you still get this problem after update
bundler
to 0.9.4 andrails 3.0.0.beta
? -
Conrad Taylor February 11th, 2010 @ 07:24 PM
Prem, everything that I have tried seems to be working using Rails 3.0 beta and Ruby 1.9.1. Also, I guess the debugging code will be removed when Rails 3.0 beta goes to the Release Candidate (RC). Here's what I have tried so far:
$ ruby -v ruby 1.9.1p376 (2009-12-07 revision 26041) [powerpc-darwin9]
$ rails blog $ cd blog $ rails g scaffold post title:string body:text $ rake db:migrate $ rails serverHowever, when using Rails 3.0 beta and Ruby 1.9.2, I'm seeing the following issue when I attempt to perform the migration:
$ ruby -v ruby 1.9.2dev (2010-01-18 trunk 26340) [powerpc-darwin9.8.0] $ rake db:migrate (in /Users/conradwt/rails.dir/examples/blog3) /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:32: warning: already initialized constant RAKEVERSION /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS WARNING: Possible conflict with Rake extension: String#ext already exists WARNING: Possible conflict with Rake extension: String#pathmap already exists /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:404: warning: already initialized constant EMPTY_TASK_ARGS /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:452: warning: already initialized constant EMPTY /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:960: warning: already initialized constant RUBY_EXT /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:964: warning: already initialized constant RUBY /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1033: warning: already initialized constant LN_SUPPORTED /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1242: warning: already initialized constant ARRAY_METHODS /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1245: warning: already initialized constant MUST_DEFINE /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1249: warning: already initialized constant MUST_NOT_DEFINE /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1253: warning: already initialized constant SPECIAL_RETURN /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1259: warning: already initialized constant DELEGATING_METHODS /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1569: warning: already initialized constant DEFAULT_IGNORE_PATTERNS /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1575: warning: already initialized constant DEFAULT_IGNORE_PROCS /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1612: warning: already initialized constant FileList /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1638: warning: already initialized constant EARLY /Users/conradwt/.rvm/gems/ruby-head/gems/rake-0.8.7/lib/rake.rb:1968: warning: already initialized constant DEFAULT_RAKEFILES rake aborted! stack level too deep rake aborted! undefined method `find' for "/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383":String
Lastly, I'll upgrade Ruby 1.9.2 from the sources and report back with my results.
-
Felipe Rodrigues April 3rd, 2010 @ 01:23 AM
I get the same using Ruby 1.9.2 revision 27203.
undefined method
find' for "/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383":String
-
Santiago Pastorino April 12th, 2010 @ 04:19 AM
Please try installing the latest version of bundler, then gem cleanup bundler and then bundle install
-
Yehuda Katz (wycats) April 13th, 2010 @ 05:33 AM
- State changed from new to needs-more-info
-
Yehuda Katz (wycats) April 13th, 2010 @ 05:33 AM
- Milestone cleared.
-
dominic May 19th, 2010 @ 05:02 PM
On windows, bundle_if_dev_or_edge fails because it is setting bundle_command to bundle.exe which should be bundle.bat. Not sure if I should write another ticket for this or not. Here is a possible fix but this pulls in rake. Might want to pull this rake functionality into thor
, --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -4,6 +4,9 @@ require 'rails/version' unless defined?(Rails::VERSION) require 'rbconfig' require 'open-uri' require 'uri' +require 'pathname' +require 'rake/alt_system' +
module Rails module ActionMethods @@ -303,9 +306,11 @@ module Rails
end def bundle_if_dev_or_edge
-
bundle_command = File.basename(Thor::Util.ruby_command).sub(/ruby/, 'bundle')
-
dir, ruby_command = Pathname.new(Thor::Util.ruby_command).split
-
bundle_command = Rake::AltSystem.find_runnable(dir + 'bundle') run "#{bundle_command} install" if dev_or_edge?
end +
protected
-
-
Anil Wadghule May 19th, 2010 @ 06:43 PM
dominic, can you share pastie of above code snippet? It's not readable.
-
dominic May 19th, 2010 @ 08:07 PM
- no changes were found...
-
Rizwan Reza May 21st, 2010 @ 12:43 AM
- no changes were found...
-
bigtoe416 May 26th, 2010 @ 09:07 PM
I had this same problem which I could solve by running 'bundle exec bash' and then running rake through that new shell. I was able to make a regular shell work correctly by making sure the environment variables in the bundled bash be the same as a regular shell. You can see your environment variables by running 'env'. I went into my ~/.bash_profile (I think ~/.profile also works if you have that, or maybe ~/.bashrc) and added a couple of export lines and modified my PATH to point to my bundle bin directory.
The exact changes for me were to add the following (this is on a snow leopard box):
export BUNDLE_GEMFILE=/Users//Work/liveops/trunk/Gemfile
export RUBYOPT="-I/usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib -rbundler/setup"
(and then I added this at the very bottom of the file) export PATH="/Users//.bundle/ruby/1.9.1/bin:PATH"Hope that helps somebody.
-
Prem Sichanugrist (sikachu) August 4th, 2010 @ 11:03 AM
I was going to ask about this ticket earlier too, and so tempted to mark as stale.
If anybody still having this problem on RC and the latest bundler, please let me know. Or else I'd have to mark it as invalid.
-
Juanma Cervera August 5th, 2010 @ 04:25 PM
- Tag changed from bundler, rails3 to bundler, rails3, rake
I am using Rails 3.0.0.rc, Ruby-1.9.2-rc2, bundler-1.0.0.rc3 and I am having this error with rake.
I think it is related with the ticket, but maybe better for anotherrake -T --trace (in /home/jmcervera/code_rails3/myapp) /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:30: warning: already initialized constant RAKEVERSION WARNING: Possible conflict with Rake extension: String#ext already exists WARNING: Possible conflict with Rake extension: String#pathmap already exists /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:402: warning: already initialized constant EMPTY_TASK_ARGS /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:450: warning: already initialized constant EMPTY /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:958: warning: already initialized constant RUBY_EXT /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:962: warning: already initialized constant RUBY /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1031: warning: already initialized constant LN_SUPPORTED /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1240: warning: already initialized constant ARRAY_METHODS /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1243: warning: already initialized constant MUST_DEFINE /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1247: warning: already initialized constant MUST_NOT_DEFINE /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1251: warning: already initialized constant SPECIAL_RETURN /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1257: warning: already initialized constant DELEGATING_METHODS /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1561: warning: already initialized constant DEFAULT_IGNORE_PATTERNS /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1567: warning: already initialized constant DEFAULT_IGNORE_PROCS /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1604: warning: already initialized constant FileList /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1630: warning: already initialized constant EARLY /home/jmcervera/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/rake.rb:1960: warning: already initialized constant DEFAULT_RAKEFILES rake aborted! stack level too deep /home/jmcervera/.rvm/gems/ruby-1.9.2-rc2@rails3/gems/rake-0.8.7/lib/rake.rb:2383
I am having this problem in one application but no with others.
This is the Gemfile I am usingsource 'http://rubygems.org' gem 'rails', '3.0.0.rc' #gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'mysql2' #gem "sqlite3-ruby", :require => "sqlite3" # bundler requires these gems in all environments gem 'haml', :git => 'git://github.com/nex3/haml.git' gem 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git', :branch => 'rails3' gem 'formtastic', :git => 'git://github.com/justinfrench/formtastic.git', :branch => 'rails3' gem 'compass', :git => 'git://github.com/chriseppstein/compass.git' gem 'compass-colors' gem 'fancy-buttons' gem 'uuidtools' gem 'show_for', :git => 'git://github.com/plataformatec/show_for.git' gem 'responders' #, :git => 'git://github.com/plataformatec/responders.git' gem 'prawn' #, :git => 'git://github.com/sandal/prawn.git' gem 'json' gem 'pdfkit', :git => 'git://github.com/jdpace/PDFKit.git' group :development do gem 'mongrel', '1.2.0.pre2' gem 'rails3-generators' gem 'wirble' end group :development, :test do gem "rspec-rails", ">= 2.0.0.beta.19" gem "factory_girl_rails" end group :test do gem "autotest-rails" gem "autotest" gem "database_cleaner", :git => 'git://github.com/bmabey/database_cleaner.git' end
Maybe I should open another ticket, shouldn't I?
Thanks
-
Juanma Cervera August 6th, 2010 @ 12:00 PM
Please forget my previous comment.
I have resolved my error and has nothing to do with rails, rake, bundle nor ruby-1.9.2.
There was an old rspec.rake file in my lib/tasks folder generating all the troubles.Thanks.
-
Prem Sichanugrist (sikachu) August 6th, 2010 @ 12:02 PM
- State changed from needs-more-info to invalid
Ok, if anybody has problem on creating new rails application in current RC, please open a new ticket. Thank you :)
-
Conrad Taylor August 6th, 2010 @ 07:35 PM
This ticket can be officially closed because I'm no longer experiencing this issue in the current Rails 3.0 RC.
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
Attachments
Referenced by
- 4779 'Stack level too deep' from calculations.rb:276 in beta3 on ruby 1.9.1 I was able to find a quick work around here https://rails...