Bundle update is failing - ruby-on-rails

I just ran bundle update and got the following error - I have no idea what this is.
c:\San\ruby>bundle update
Updating git://github.com/odorcicd/authlogic.git
github.com[0: 207.97.227.239]: errno=No error
fatal: unable to connect a socket (No error)
An error has occurred in git when running git fetch --force --quiet --tags "git
://github.com/odorcicd/authlogic.git" refs/heads/*:refs/heads/*. Cannot complete bundling.
All my gems are up to date (gem update --system) and installed (bundle install). I did just upgrade from Rails 3.0.0 to 3.0.1, which required some other updates for Activesupport, Activemodel, etc, also to 3.0.1. Do you know what might be causing the error above?

At first glance, this looks like a network error connecting to github. Try to clone the repo via command line and see if you can get to it. A proxy or firewall may be causing this issue.
git clone git://github.com/odorcicd/authlogic.git
Or you can try the http url instead:
http://github.com/odorcicd/authlogic.git

Related

RoR: Rake failing - "Not a git repository : .git" & "Could not find activesupport-4.2.3 in any of the sources"

UPDATE 2: This gem is definitely causing the git errors as well. In the gemspec files it has git commands which when I commented out, got rid of the git errors.
UPDATE 1: So after uninstalling ruby and all gems and going back through and reinstalling I found the source of at least one of the issues. The devise-neo4j gemfile.lock requires version 4.2.3 of activesupport and all other rails gems. Currently looking to see if there's a fix. Not sure if that is also causing the weird git errors but they seemed to crop up at the exact same time.
ORIGINAL POST:
When running any rake command I get the following error :
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Could not find activesupport-4.2.3 in any of the sources
Run `bundle install` to install missing gems.
Which makes no sense because when I run git status I get:
On branch master
nothing to commit, working tree clean
and I also have active support installed so I have no idea whats happening:
C:\Users\mcr43\RubymineProjects\Carbon>bundle show activesupport
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1
I've tried looking for a solution via other people with similar issues but nothing seems to be working.
Where do run a rake command. in development or in production? In development it should not have anything to do with git. Are you using rails 5+? than you can also try rails db:migrate instead of rake. at least in development. Did you check git remote? did you run git add . and git commit -m "com" correctly? Did you push everything into git? Can you see your app in your git folder online? Try these things and double check.
Have you tried running bundle install?
You have activesupport-5.0.1 installed, but it is looking for activesupport-4.2.3
So after uninstalling ruby and all gems and going back through and reinstalling I found the source of at least one of the issues. The devise-neo4j gemfile.lock requires version 4.2.3 of activesupport and all other rails gems. Currently looking to see if there's a fix. Not sure if that is also causing the weird git errors but they seemed to crop up at the exact same time.
UPDATE: This gem is definitely causing the git errors. In the gemspec files it has git commands which when I commented out, got rid of the git errors.

Issues updating Heroku to a newer version on Cloud9 IDE

I've been having trouble trying to update to the latest version of Heroku on Cloud9 as you can see here:
~/workspace/hello_app (master): $ heroku version
heroku-toolbelt/3.31.3 (x86_64-linux) ruby/2.1.5
You have no installed plugins.
WARNING: Toolbelt v3.37.6 update available.
But when I try to update it, this is what I got:
~/workspace/hello_app (master):$ heroku update
! To update this version of the Heroku client please use
! `apt-get install heroku-toolbelt`
Then I tried typing in 'apt-get install heroku-toolbelt' into my terminal and this was the result:
~/workspace/hello_app (master): $ apt-get install heroku-toolbelt
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I have also tried to install Heroku Toolbelt using https://toolbelt.heroku.com/ , but I still seem to get the same warning that you see with the first code above telling me that I need to update it to v 3.37.6 . I'm sorry for this newbie mistake, but is there anyone out there that can help me resolve this little issue, please? Thanks.
You should use
sudo apt-get install heroku-toolbelt
In the new version of Cloud9 we don't have support for deployment from the UI yet unfortunately.
You can manually install various command-line tools into your workspace and deploy using the command line. It should go without saying that this is for developers that aren't afraid of the command line.
https://docs.c9.io/v1.0/docs/deploying-via-cli
I got the same problem and it got resolved by this..
$ heroku login
$ heroku version
heroku-toolbelt/3.37.6 (x86_64-linux) ruby/2.2.1
You have no installed plugins.
$ heroku plugins:update
$ heroku plugins:install
Installing Heroku Toolbelt v4... done
Setting up node-v4.1.2... done
Installing core plugins heroku-cli-addons, heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run, heroku-status... done
▸ Missing argument: NAME
$ heroku version
heroku-toolbelt/3.37.6 (x86_64-linux) ruby/2.2.1
heroku-cli/4.25.2-beb750a (amd64-linux) go1.5.1
=== Installed Plugins
heroku-apps#0.3.0
heroku-cli-addons#0.0.2
heroku-fork#4.0.0
heroku-git#2.4.1
heroku-local#4.1.4
heroku-run#2.7.1
heroku-status#1.2.2

Gem file with git remote failing on heroku push

I have the following line in my gemfile:
gem 'client_side_validations', :git => "git#github.com:Dakuan/client_side_validations.git", :branch => "master", ref: '2245b4174ffd4b400d999cb5a2b6dccc0289eb67'
The repo it's pointing at is public and I can run bundle install / update locally just fine. When I try to push to Heroku I get the following error:
Fetching git#github.com:Dakuan/client_side_validations.git
Host key verification failed.
fatal: The remote end hung up unexpectedly
Git error: command `git clone 'git#github.com:Dakuan/client_side_validations.git' "/tmp/build_1xa9f06n4k1cu/vendor/bundle/ruby/1.9.1/cache/bundler/git/client_side_validations-56a04875baabb67b5f8c192c6c6743df476fd90f" --bare --no-hardlinks` in directory /tmp/build_1xa9f06n4k1cu has failed.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
Anyone got any ideas about what's going on here?
Use this GitHub URL instead: git://github.com/Dakuan/client_side_validations.git
The git#github.com:… URL is the writable SSH version, which requires authentication with an SSH key connected to a GitHub account that has write access to the repository.
The git://github.com/… URL is the public, read-only version.
Since the gem you're using is in a public GitHub repository, you can also use this shorthand in your Gemfile:
gem 'client_side_validations', :github => 'Dakuan/client_side_validations'
See the Bundler Git documentation for more information.
A late second answer, as I ran into some confusing output from Heroku's build logs which stumped me for a while.
If you have multiple Github hosted gems in your Gemfile, and one of them is inaccessible (in my case, I had accidentally pointed to a private repo of mine), the build logs throw an error like Username not found or Repository not found for all the Github hosted gems - even those that are available.

Gem not installing, showing connection error

When I try to install gem like bundler or rake after creating new gemset , its not installing
,but if i intall old version its working fine for me . Here are the error logs while installing gems
gem install rake
Fetching: rake-0.9.2.2.gem ( 7%)ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (http://cachefly.mirrors.rubygems.org/gems/rake-0.9.2.2.gem)
This problem was caused by the cachefly server.
It seems that the folks over at rubygems.org disabled this mirror and then people's downloads were able to continue successfully.
There is a thread over at rubygems.org discussing this issue.
Use DevKit to install gem separately .
Edit :
Please check if you curl or wget that URL:
wget http://production.cf.rubygems.org/gems/rails-2.3.8.gem
curl -O http://production.cf.rubygems.org/gems/rails-2.3.8.gem
If not, then the problem is with your internet connection, http proxy or
provider.
If your browser works, might be due an HTTP proxy.
I had a similar issue when Capistrano was running a bundle install on a remote server. It seems to have been caused by a .rvmrc file in the project that I had not authorised.
So all I had to do to fix is was ssh into the server, cd into the project and accept the .rvmrc config file.
got similar problem
gem install rails
# after 5 minutes
WARNING: Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
gem install rails --source 'https://rubygems.org'
# after 5 minutes
WARNING: Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
but when I create Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.13'
and run bundle install it works
my location is London, UK
(also created topic on http://help.rubygems.org/discussions/problems/4494-too-many-connection-resets-when-gem-install-rails )
Always check if your computer isn't downloading because of administrator privileges (in cmd, shell, or rubymine).

bundle install leads to git clone error. Not sure what this response means

Getting a strange error on bundle install..
bundle install
Fetching gem metadata from http://rubygems.org/.....
Fetching gem metadata from http://rubygems.org/..
Fetching git://github.com/maccman/gdata.git
fatal: The remote end hung up unexpectedly
Git error: command `git clone 'git://github.com/maccman/gdata.git' "/Users/elephanttrip/.rvm/gems/ruby-1.9.2-p318#shasta/cache/bundler/git/gdata-811f852468ac76e0019108d8c5320da12b6683d4" --bare --no-hardlinks` in directory /Users/elephanttrip/Sites/shasta has failed.
This wasn't happening until I installed the mysql2 gem and mysql with brew.
Any ideas what this error means?
UPDATE
Also none of the folders it is trying to clone this to exist. It's probably something to do with my bundle paths and juggling .rvm
The problem is not on your end. Trying:
git clone 'git://github.com/maccman/gdata.git' "foobar" --bare --no-hardlinks
Fails on my machine with the same error.
Interestingly a non-bare clone seems to work as expected.
resolution: Clone from the https interface: https://github.com/maccman/gdata.git instead.
In your Terminal write bundle config github.https true
In your Terminal write bundle install
Add your SSH key to the github.
Or as #brice mentioned, you need to add your team to the repo.

Resources