Jatin
Jatin

Reputation: 14269

'bundle install' not working in rails

I created a new rails project by rails new app . Then the command prompt showed the creation of a few files and then is displayed run bundle install and showed some stuff after that.

However, then I changed the Gemfile to add some new gems and ran bundle install again to install those gems but I get invalid argument error. So, how do I run bundle install?

Rails version : 3.2.1, Ruby version : 1.9.3

Here's the 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'

Update

As is turns out I had installed something called MoSync some time back and it probably came with a bundle command with it. So, when I was typing bundle install, it was trying to run something else but couldn't find a valid argument.

It became clear when I typed just bundle in the powershell and saw this:

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

Upvotes: 0

Views: 3901

Answers (3)

Moch Lutfi
Moch Lutfi

Reputation: 552

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

That bundle command executed from Mosync. Check this link. http://www.mosync.com/docs/sdk/cpp/guides/storage/mafs-library/index.html

[SOLUTION 1] Remove Mosync from SYSTEM PATH then try to use bundle again.

[SOLUTION 2] Direct access for bundle for ruby

C:\Ruby193\bin\bundle install

Upvotes: 0

Jordon Bedwell
Jordon Bedwell

Reputation: 3247

You will need to either create an alias using doskey:

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

Or run it with the full path:

C:\ruby\bin\bundle install

Note that C:\ruby\ should be changed to the path you installed Rails Installer to.

You can also adjust your path and make C:\ruby\ the most important by going to "Control Panel > System > Environment Variables (button at the bottom)" and then editing Path and moving the path to Rails Installer up higher (before anything else.) Doing this method will prevent errors with Rails in the future but occasionally you will have to adjust your path because other things can adjust your path while installing.

Upvotes: 2

Jeff
Jeff

Reputation: 109

Seems like you are running Windows OS. Perhaps it might be a hidden character somewhere? The easiest thing to do is to install something like RVM (Ruby Version Manager). I believe it is Pik for Windows (https://github.com/vertiginous/pik/). Try installing again.

Also try removing everything after 'beta' in

2.0.0.beta.18

to make it

gem 'rspec-rails', '2.0.0.beta'

Upvotes: 0

Related Questions