我创建了一个新的 Rails 项目rails new app
。然后命令提示符显示了一些文件的创建,然后显示run bundle install
并显示了一些内容。
但是,然后我更改了 Gemfile 以添加一些新的 gem,然后bundle install
再次运行以安装这些 gem,但invalid argument
出现错误。那么,如何运行捆绑安装?
Rails 版本:3.2.1,Ruby 版本:1.9.3
这是宝石文件
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 命令。所以,当我输入 时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