2013-05-05 5 views
0

rake db : migrate하려고합니다.rake db : 마이그레이션 rake aborted! 기존의 gemspec에서 이름을 확인할 수 없습니다.

require "bundler/gem_tasks" 

이 내가 추적 할 때 내가 무엇을 가지고 있습니다 :이가, 내 Rakefile 라인 6에서

rake aborted! 
Unable to determine name from existing gemspec. Use :name => 'gemname' in #inst 
ll_tasks to manually set it. C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>' 

: 나는 저장소를 복제 및 DB를 긁어 노력이 오류를 마이그레이션하지만, 얻을 그것 :

C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:30:i 
n `initialize' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i 
n `new' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i 
n `install_tasks' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_tasks.rb:2:in 
`<top (required)>' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen 
dencies.rb:251:in `require' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen 
dencies.rb:251:in `block in require' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen 
dencies.rb:236:in `load_dependency' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen 
dencies.rb:251:in `require' 
C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l 
oad' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l 
oad_rakefile' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in ` 
raw_load_rakefile' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `b 
lock in load_rakefile' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in ` 
standard_exception_handling' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `l 
oad_rakefile' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `b 
lock in run' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in ` 
standard_exception_handling' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `r 
un' 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)> 
' 
C:/Ruby193/bin/rake:23:in `load' 
C:/Ruby193/bin/rake:23:in `<main>' 

나는 어제 내가 내 사무실에서 일하고 있었고 모든 것이 괜찮 았기 때문에 무엇이 잘못되었는지 전혀 모른다. 내 랩톱에서 저장소를 복제하려고하지만 작동하지 않습니다.

내 gemfile : 나는 프로덕션 데이터베이스로 PostgreSQL을 설정하여 gemfile에서 볼

source 'https://rubygems.org' 

if RUBY_VERSION =~ /1.9/ 
    Encoding.default_external = Encoding::UTF_8 
    Encoding.default_internal = Encoding::UTF_8 
end 

group :production do 
    gem 'pg', '0.12.2' 
end 

gem 'magic_encoding' 

gem 'rails', '3.2.2' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 

gem 'activeadmin' 

gem "bcrypt-ruby", :require => "bcrypt" 

# to copy to clipboard 
gem 'zeroclipboard-rails' 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'coffee-rails', '~> 3.2.1' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    #gem 'therubyracer' 

    gem 'uglifier', '>= 1.0.4' 
    gem 'sass-rails', '~> 3.2' 
    gem 'bootstrap-sass', '~> 2.3.1.0' 
    gem 'closure-compiler' 

end 

gem 'jquery-rails' 
+0

'rake db : migrate' 전에'bundle install'을 실행 했습니까? –

+0

예, 모든 것이 OK였습니다 – ishwr

+0

나는 번들을 설치할 때 'sqlite 사용'이 없다는 것을 깨달았습니다. Eventhough "gem 'sqlite3'"내 gemfile 있습니다. 전에 이런 식으로 본 적이 없었습니다. 너나 다른 사람이 전에 이런 걸 본 적이 있니? – ishwr

답변

0

, 그러나 당신은 또한 생산, 테스트 및 개발을 실행하는 SQLite는 설정합니다.

group :production do 
    gem 'pg', '0.12.2' 
end 

# Skip some lines to here 

gem 'sqlite3' 

데이터베이스가 테스트, 개발 및 프로덕션 서버 전체에서 동일해야합니다. 내가 sqlite3를 제거하고 단순히 PostgreSQL은 모든 플랫폼에서 실행됩니다

group :production do 
    gem 'pg', '0.12.2' 
end 

gem 'pg', '0.12.2' 

와 그 방법을 대체 할 것이다. 또는 database.yml이 sqlite에 연결되어 있다면 postgresql을 없애고 gemfile에 sqlite gem을 보관하십시오.

+0

그것은 일했다 :) 당신의 대답에 대한 감사 ^^ 이제는 내 번들에서 sqlite를 볼 수 있지만 여전히 긁어 모을 수는 없다. db : migrate – ishwr

+0

신경 쓰지 마라. 그것은 지금 당신에게 감사했다 :) 분명히 나는 ​​아직도 내가 더 이상 사용하지 않는 gemspec 파일을 가지고있다. – ishwr

+0

그것은 당신을 위해 잘했기 때문에 기쁘다. – jason328