2012-12-28 41 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出现错误,但是偶尔你将不得不调整你的路径,因为其他的东西可以在安装时调整你的路径。