[英]'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.