2012-12-28 39 views
0

我在rails new app的基礎上創建了一個新的導軌項目。然後命令提示符顯示幾個文件的創建,然後顯示run bundle install並在此之後顯示一些東西。'捆綁安裝'不能在導軌上工作

然而,我改變了Gemfile以添加一些新的寶石,並再次運行bundle install來安裝這些寶石,但我得到invalid argument錯誤。那麼,我如何運行軟件包安裝?

Rails的版本:3.2.1, 紅寶石版本:1.9.3

這裏的Gemfile中

source 'https://rubygems.org' 

gem 'rails', '3.2.1' 

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

gem 'sqlite3' 


# 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' 

    gem 'uglifier', '>= 1.0.3' 
end 

group :development do 
    gem 'rspec-rails', '2.0.0.beta.18' 
end 

group :test do 
    gem 'rspec', '2.0.0.beta.18' 
end 

gem 'jquery-rails' 

更新

因爲是原來我曾打電話MoSync安裝的東西有一段時間,它可能帶有一個捆綁命令。所以,當我輸入bundle install時,它試圖運行其他東西,但找不到有效的參數。

很明顯,當我輸入只是bundle在PowerShell中見到了這個:

MAUtil::MAFS Bundle tool 

This tool is used to build a binary image of a folder on a desktop computer. 

Usage: 
bundle <parameters> 

Parameters: 
    -in <input file or folder> the input files or folders to add to the 
          image (multiple -in directives may be added). 
    -out <output file>   the name of the image to be created (only one). 
    -toUpper/-toLower   change case of all file names to upper or lower 
          case. 

Example: 
    bundle -in data -out anotherworld.bun -toLower 
+0

向我們展示你的Gemfile,最有可能在它有一個錯誤。同時向我們顯示實際的錯誤輸出。你沒有給我們足夠的信息來幫助你,我們也猜不到:) – Agis

+0

@Agis錯誤只是這麼多而已。兩個字,就是。 – Jatin

+2

'rspec-rails' vresion字符串中存在拼寫錯誤:'bete'而不是'beta'。我不確定這是否是問題,但您可以嘗試:)。 – mrzasa

回答

0
MAUtil::MAFS Bundle tool 

This tool is used to build a binary image of a folder on a desktop computer. 

Usage: 
bundle <parameters> 

Parameters: 
    -in <input file or folder> the input files or folders to add to the 
          image (multiple -in directives may be added). 
    -out <output file>   the name of the image to be created (only one). 
    -toUpper/-toLower   change case of all file names to upper or lower 
          case. 

Example: 
    bundle -in data -out anotherworld.bun -toLower 

從Mosync執行該捆綁命令。 選中此鏈接。 http://www.mosync.com/docs/sdk/cpp/guides/storage/mafs-library/index.html

[解決方案1] 從SYSTEM PATH中刪除Mosync,然後嘗試再次使用包。

[解決方案2] 爲束直接訪問紅寶石

C:\Ruby193\bin\bundle install 
0

好像你正在運行Windows操作系統。也許這可能是一個隱藏的角色?最簡單的事情就是安裝諸如RVM(Ruby Version Manager)之類的東西。我相信它是Windows的Pik(https://github.com/vertiginous/pik/)。嘗試再次安裝。

也可以嘗試在

2.0.0.beta.18

'測試' 之後,除去一切使它

寶石 'RSpec的護欄',「2.0 .0.beta'

2

您需要使用創建別名:

doskey bundull=C:\ruby\bin\bundle 
bundull install 

或用全路徑運行:

C:\ruby\bin\bundle install 

需要注意的是C:\紅寶石\應改爲你安裝了Rails安裝程序的路徑。

您也可以調整您的路徑,並通過去使C:\ruby\最重要的是「控制面板>系統>環境變量(底部按鈕)」,然後編輯路徑和移動路徑滑軌安裝了更高(在其他任何事情之前)。做這個方法將來會防止Rails出現錯誤,但是偶爾你將不得不調整你的路徑,因爲其他的東西可以在安裝時調整你的路徑。