2013-03-05 72 views
0

我剛剛開始一個名爲圖書館管理系統的新項目。在運行軟件包安裝時,我在我的系統上安裝了Python 3.3.3。我收到以下錯誤。在rails 3.2中執行bundle安裝時出錯

D:\Projects\Library>bundle install 
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ 
dsl.rb:7:in `instance_eval': D:/Projects/Library/Gemfile:27: syntax error, unexp 
ected tDOT2, expecting $end (SyntaxError) 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/dsl.rb:7:in `evaluate' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/definition.rb:17:in `build' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler.rb:138:in `definition' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/cli.rb:219:in `install' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/vendor/thor/task.rb:22:in `run' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/vendor/thor.rb:263:in `dispatch' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/lib/bundler/vendor/thor/base.rb:386:in `start' 
     from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 
/bin/bundle:13:in `<top (required)>' 
     from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `load' 
     from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `<main>' 

Gemlock文件如下: -

GEM 
    remote: https://rubygems.org/ 
    specs: 
    actionmailer (3.2.11) 
     actionpack (= 3.2.11) 
     mail (~> 2.4.4) 
    actionpack (3.2.11) 
     activemodel (= 3.2.11) 
     activesupport (= 3.2.11) 
     builder (~> 3.0.0) 
     erubis (~> 2.7.0) 
     journey (~> 1.0.4) 
     rack (~> 1.4.0) 
     rack-cache (~> 1.2) 
     rack-test (~> 0.6.1) 
     sprockets (~> 2.2.1) 
    activemodel (3.2.11) 
     activesupport (= 3.2.11) 
     builder (~> 3.0.0) 
    activerecord (3.2.11) 
     activemodel (= 3.2.11) 
     activesupport (= 3.2.11) 
     arel (~> 3.0.2) 
     tzinfo (~> 0.3.29) 
    activeresource (3.2.11) 
     activemodel (= 3.2.11) 
     activesupport (= 3.2.11) 
    activesupport (3.2.11) 
     i18n (~> 0.6) 
     multi_json (~> 1.0) 
    api_taster (0.6.0) 
     bootstrap-sass (~> 2.1) 
     jquery-rails 
     rails (>= 3.1.0) 
     redcarpet 
     remotipart (~> 1.0) 
     sass-rails 
    arel (3.0.2) 
    bcrypt-ruby (3.0.1) 
    bcrypt-ruby (3.0.1-x86-mingw32) 
    bootstrap-sass (2.2.2.0) 
     sass (~> 3.2) 
    bootswatch-rails (0.4.0) 
     railties (>= 3.1) 
    builder (3.0.4) 
    carrierwave (0.8.0) 
     activemodel (>= 3.2.0) 
     activesupport (>= 3.2.0) 
    coffee-rails (3.2.2) 
     coffee-script (>= 2.2.0) 
     railties (~> 3.2.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.5.0) 
    commonjs (0.2.6) 
    devise (2.2.1) 
     bcrypt-ruby (~> 3.0) 
     orm_adapter (~> 0.1) 
     railties (~> 3.1) 
     warden (~> 1.2.1) 
    erubis (2.7.0) 
    execjs (1.4.0) 
     multi_json (~> 1.0) 
    hike (1.2.1) 
    i18n (0.6.4) 
    journey (1.0.4) 
    jquery-rails (2.2.1) 
     railties (>= 3.0, < 5.0) 
     thor (>= 0.14, < 2.0) 
    json (1.7.7) 
    less (2.2.2) 
     commonjs (~> 0.2.6) 
    less-rails (2.2.6) 
     actionpack (>= 3.1) 
     less (~> 2.2.0) 
    less-rails-bootstrap (2.2.1) 
     less-rails (~> 2.2.0) 
    mail (2.4.4) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.21) 
    multi_json (1.6.1) 
    orm_adapter (0.4.0) 
    pg (0.14.1) 
    pg (0.14.1-x86-mingw32) 
    polyglot (0.3.3) 
    rack (1.4.5) 
    rack-cache (1.2) 
     rack (>= 0.4) 
    rack-protection (1.3.2) 
     rack 
    rack-ssl (1.3.3) 
     rack 
    rack-test (0.6.2) 
     rack (>= 1.0) 
    rails (3.2.11) 
     actionmailer (= 3.2.11) 
     actionpack (= 3.2.11) 
     activerecord (= 3.2.11) 
     activeresource (= 3.2.11) 
     activesupport (= 3.2.11) 
     bundler (~> 1.0) 
     railties (= 3.2.11) 
    railties (3.2.11) 
     actionpack (= 3.2.11) 
     activesupport (= 3.2.11) 
     rack-ssl (~> 1.3.2) 
     rake (>= 0.8.7) 
     rdoc (~> 3.4) 
     thor (>= 0.14.6, < 2.0) 
    rake (10.0.3) 
    rdoc (3.12.2) 
     json (~> 1.4) 
    redcarpet (2.2.2) 
    redis (3.0.2) 
    redis-namespace (1.2.1) 
     redis (~> 3.0.0) 
    remotipart (1.0.2) 
    resque (1.23.0) 
     multi_json (~> 1.0) 
     redis-namespace (~> 1.0) 
     sinatra (>= 0.9.2) 
     vegas (~> 0.1.2) 
    resque-scheduler (2.0.0) 
     redis (>= 2.0.1) 
     resque (>= 1.20.0) 
     rufus-scheduler 
    rufus-scheduler (2.0.17) 
     tzinfo (>= 0.3.23) 
    sass (3.2.6) 
    sass-rails (3.2.6) 
     railties (~> 3.2.0) 
     sass (>= 3.1.10) 
     tilt (~> 1.3) 
    sinatra (1.3.3) 
     rack (~> 1.3, >= 1.3.6) 
     rack-protection (~> 1.2) 
     tilt (~> 1.3, >= 1.3.3) 
    sprockets (2.2.2) 
     hike (~> 1.2) 
     multi_json (~> 1.0) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    thor (0.17.0) 
    tilt (1.3.4) 
    treetop (1.4.12) 
     polyglot 
     polyglot (>= 0.3.1) 
    twitter-bootstrap-rails (2.2.4) 
     actionpack (>= 3.1) 
     execjs 
     railties (>= 3.1) 
    tzinfo (0.3.35) 
    uglifier (1.3.0) 
     execjs (>= 0.3.0) 
     multi_json (~> 1.0, >= 1.0.2) 
    vegas (0.1.11) 
     rack (>= 1.0.0) 
    warden (1.2.1) 
     rack (>= 1.0) 

PLATFORMS 
    ruby 
    x86-mingw32 

DEPENDENCIES 
    api_taster 
    bootswatch-rails 
    carrierwave 
    coffee-rails (~> 3.2.1) 
    devise 
    execjs 
    jquery-rails 
    less-rails-bootstrap 
    pg 
    rails (= 3.2.11) 
    resque 
    resque-scheduler 
    sass-rails (~> 3.2.3) 
    twitter-bootstrap-rails 
    uglifier (>= 1.0.3) 

我的Gemfile: -

source 'https://rubygems.org' 

gem 'rails', '3.2.11' 

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

#gem 'sqlite3' 

gem 'pg' 

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

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

gem 'carrierwave' 
        <-----Line 27 
gem 'devise' 

gem 'resque' 
gem 'resque-scheduler', :require => 'resque_scheduler' 

gem 'api_taster' 

gem 'twitter-bootstrap-rails' 

gem 'less-rails-bootstrap' 

gem 'execjs' 

# gem 'therubyracer' 

gem 'bootswatch-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'debugger' 

可以請您幫助我。

+0

請發佈您的Gemfile的內容,而不是Gemfile.lock。你還可以突出顯示第27行的Ge​​mfile – 2013-03-05 12:45:12

+0

@RobinFisher我已經更新了這個問題。請問你能幫我 – Rockking 2013-03-05 12:59:16

+0

這是怎麼評估你的文件:'#gem ' sqlite3 '',爲什麼會這樣? – PericlesTheo 2013-03-05 13:09:57

回答

1

看來,寶石「Twitter的引導護欄」和創業板護欄,bootstrap'give誤差較小。 我在db:create期間發生錯誤。

C:\Sites\Library>rake db:create 
[WARNING] Please install gem 'therubyracer' to use Less. 
rake aborted! 
cannot load such file -- v8 
C:/Sites/Library/config/application.rb:7:in `<top (required)>' 
C:/Sites/Library/Rakefile:5:in `<top (required)>' 
(See full trace by running task with --trace) 

所以我刪除這兩個them.Instead的我去了'引導-Sass的寶石以實現軌引導,它似乎爲我工作的罰款。 不知道我是否正確

1

好吧,現在你已經發現了問題,我會建議安裝'bootstrap-sass'寶石,我知道它的工作100%。

我正好回答類似的問題所以這裏的鏈接: how to use that gem and why

1

而不是做這一切,你可以從頭開始重新開始一個項目。 請相應更新您的gemfile

+0

稍後我會試一試。感謝@Pravin Varankar – Rockking 2013-03-07 06:59:20