[英]'bundle install' not working in rails
我通過rails new app
創建了一個新的rails項目。 然后命令提示符顯示創建了一些文件,然后顯示run bundle install
並顯示一些東西。
但是,然后我更改了Gemfile以添加一些新的gem並再次運行bundle install
來安裝這些gem,但是我得到了invalid argument
錯誤。 那么,我該如何運行bundle install?
Rails版本:3.2.1,Ruby版本: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
,它試圖運行其他東西,但找不到有效的參數。
當我在powershell中輸入bundle
時看到了這個:
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
您需要使用doskey
創建別名:
doskey bundull=C:\ruby\bin\bundle
bundull install
或者使用完整路徑運行它:
C:\ruby\bin\bundle install
請注意,C:\\ ruby \\應更改為您安裝Rails安裝程序的路徑。
你也可以通過轉到“ 控制面板>系統>環境變量 (底部的按鈕)”調整路徑並使C:\\ruby\\
最重要,然后編輯路徑並將路徑移到更高的Rails安裝程序(之前的任何內容)否則。)執行此方法將防止將來出現Rails錯誤,但有時您將不得不調整路徑,因為其他東西可以在安裝時調整您的路徑。
好像你在運行Windows操作系統。 也許它可能是一個隱藏的角色? 最簡單的方法是安裝類似RVM(Ruby Version Manager)的東西。 我相信它是Pik for Windows(https://github.com/vertiginous/pik/)。 再試一次安裝。
也請嘗試在'beta'之后刪除所有內容
2.0.0.beta.18
做到這一點
gem'rspec-rails','2.0.0.beta'
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,然后再次嘗試使用bundle。
[解決方案2]直接訪問ruby包
C:\Ruby193\bin\bundle install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.