When I try to run bundle install using this in my Gemfile
gem 'activeadmin', github: 'gregbell/active_admin'
I get :
Fetching git://github.com/gregbell/active_admin.git
Retrying source fetch due to error (2/3): You need to install git to be able to
use gems from git repositories. For help installing git, please refer to GitHub'
s tutorial at https://help.github.com/articles/set-up-git
But I already have git installed, and also I can run git commit, git pull and others command.
I'm on windows 8, using RoR 4
There are two ways to access github, over git:// and http:// you can try over http://
I have this line in my Gemfile, you can adapt it to your needs:
gem 'activeadmin-mongoid', :git => 'https://github.com/piousbox/activeadmin-mongoid.git', :branch => 'fix_sidebar_disable'
So for you maybe
gem 'activeadmin', :git => 'https://github.com/gregbell/active_admin.git'
Also, I assume you do have git installed? Because the error says, install git ; )
sudo apt-get install git if you are on ubuntu, or
brew install git if you are on Mac OS X.
Related
I want to install fluent-plugin-route, but I don't know how.
i can't use gem install fluent-plugin-route because there's no internet.
Any ideas?
Suggestion: Build the package with rake and install it with gem
1) git clone "Your Repository"
2) bundle install
If you don't have bundler "gem install bundler"
3) bundle exec rake build
4) gem install pkg/xxx.gem (Location would be pkg folder)
Copy paste your gem via gem install --local as mentioned by DeeChok on your offline VM via gem produced on your online VM by following step 1-4
Download the gem and its dependencies (also gems)
Put them on the node/instance/vm
Change directory to where the gems are located
Run the below command:
gem install -N --conservative --minimal-deps --no-document --force --local *gem
N.B: You will have to have ruby installed. You can do that install ruby from source by following the steps here. You may need to install gcc, gcc-c++, openssl-dev(OR libel-dev on RHEL7) before hand.
Hope this helps :)
Whenever I run bundle update or bundle install on Windows 8.1 I can't update/install gems from github. I can install other gems like uglifier, but it doesn't work for github gems specifically. For example, putting this in the Gemfile
group :development, :test do
gem 'rspec-rails', '2.13.1'
gem 'spork-rails', github: 'sporkrb/spork-rails'
end
results in the error:
Retrying source fetch due to error (2/3): You need to install git to be able to use gems from git repositories.
The problem is I definitely have git installed. I was running this from Git Bash and working in a project that I was cloning, pulling, and working with off of Git. So why does the bundle update/install keep insisting that I don't have git installed? How do I fix it and make bundle install work?
Are you running a pre-release version of Bundler? This commit might be related to your problem; it looks like earlier versions of Bundler scan your %PATH% for "git", but not "git.exe".
The easiest solution would be to backport bundler to 1.3.5:
gem uninstall bundler
gem install bundler
Don't forget to select radio "Use git from Windows Command Prompt" while installing the Git. Thats the key!
By default "Use git from Git Bash only" is set.
For me it was also the path, with space and accent, I guess that was the accent the issue. installed the bundler 1.6-pre, uninstalled git, reinstalled it in C:\Git, changed the path of git in my IDE (RubyMine) and finally installed every gems using bundle install.
Thanks a lot!
While on Windows, if you're still getting that error after installing git too, make sure to close the 'CMD' instance and open it again, the system paths vars have been set, but not instantiated in the active 'CMD' window.
In my gem file I have a Git reference:
gem "calendar_date_select", :git => 'git://github.com/paneq/calendar_date_select.git'
I would like to know where bundler paced that Git checkout so I can manually clean it.
Thanks.
this depends on your local setup. let me explain by one of my projects.
it's within an rvm gemset, so my .rvmrc is like this:
rvm use ruby-1.9.3-p125#hamburg_on_ruby --install --create
and i use ActiveAdmin from git in my Gemfile
gem "activeadmin", :git => "https://github.com/gregbell/active_admin.git"
which results in a Gemfile.lock like this
GIT
remote: https://github.com/gregbell/active_admin.git
revision: 82a13de45feeba2510f015aaae9d412878e4c6f5
so the actual cloned repo is in
~/.rvm/gems/ruby-1.9.3-p125#hamburg_on_ruby/bundler/gems/active_admin-82a13de45fee/
I was trying to install this gem https://github.com/frodefi/rails-messaging into a rails application.
The README gave instructions to put this in my Gemfile
gem 'messaging', git: 'git://github.com/frodefi/rails-messaging.git'
gem 'mailboxer', git: 'git://github.com/dickeytk/mailboxer.git'
However, when I tried to run bundle install, i got this error message
Git error: command `git clone 'git://github.com/dickeytk/mailboxer.git' "/Users/mm/.rvm/gems/ruby-1.9.3-rc1#rails321/cache/bundler/git/mailboxer-d05808c480dfc6c9f04b8334dfdf7879cea63172" --bare --no-hardlinks` in directory /Users/mm/Sites/shawsome has failed.
I googled the error message and saw that some people had gotten this error message when they didn't have git installed. However, I've been using git for a while without problem. Anyone have any suggestions as to what might be the problem.
I also tried changing the syntax to no avail
gem 'messaging', :git => 'git://github.com/frodefi/rails-messaging.git'
I don't see a github account at https://github.com/dickeytk so that's probably why the git command is failing. Consider just using mailboxer from rubygems:
gem 'mailboxer'
or the repo that's linked to as the homepage from rubygems.org for this gem:
gem 'mailboxer', git: 'git://github.com/ging/mailboxer.git'
i want to install this https://github.com/sferik/rails_admin
so i pasting those 2 in the gemfile
gem 'devise' # Devise must be required before RailsAdmin
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
however when i bundle install, the second one alone seems to give this problem:
Fetching git://github.com/sferik/rails_admin.git
sh: git: command not found
An error has occurred in git when running `git clone "git://github.com/sferik/rails_admin.git" "/Library/Ruby/Gems/1.8/cache/bundler/git/rails_admin-76c2c78f1892a43807d922e810aef4edcddc12b7" --bare --no-hardlinks`. Cannot complete bundling.
Any ideas?
It doesn't appear as if you have git installed. Please follow the GitHub guide for installing it on your operating system.