I am installing Dashing Dashboard on Pi3. I have "Could not find 'bundler' problem in installation steps. How can I finish the installation?
$ source /home/pi/.rvm/scripts/rvm
-> OK
$ rvm current
ruby-2.3.0
$ bundle
/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in 'to_specs': Could not find 'bundler' (>= 0) among 42 total gem(s) (Gem::LoadError)
from /usr/lib/ruby/2.1.0/rubygems/dependency.rb:309:in 'to_specs'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in 'gem'
from /usr/local/bin/bundle:22:in '<main>'
$ gem install bundler
-> OK
$ bundle
-> the same problem
I imagine you've messed up your permissions, installing bundler into system gems by running sudo gem install bundler.
Delete the bundler and then install it under RVM. Double check your paths so its being installed in the RVM gem stash, not system's.
Related
How can this be explained and remedied?
-bash> gem list bundler
*** LOCAL GEMS ***
bundler (default: 2.2.21)
-bash> bundler --version
Bundler version 2.1.4
-bash> gem uninstall bundler:2.1.4
Gem 'bundler' is not installed
-bash> gem environment | grep INSTALL
- INSTALLATION DIRECTORY: /Users/me/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: /Users/me/.gem/ruby/2.7.0
-bash> find /Users/me/.rbenv/versions/2.7.4/ -name "bundler*"
/Users/me/.rbenv/versions/2.7.4//bin/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/2.7.0/rubygems/bundler_version_finder.rb
/Users/me/.rbenv/versions/2.7.4//lib/ruby/2.7.0/exe/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/2.7.0/bundler.rb
/Users/me/.rbenv/versions/2.7.4//lib/ruby/2.7.0/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/specifications/default/bundler-2.2.21.gemspec
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/cache/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/cache/bundler-2.2.21.gem
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/doc/bundler-2.2.21
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/doc/bundler-2.2.27
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/bootsnap-1.8.1/lib/bootsnap/bundler.rb
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/bundler-2.2.21
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/bundler-2.2.21/exe/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/rubocop-1.13.0/lib/rubocop/cop/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/bootsnap-1.7.4/lib/bootsnap/bundler.rb
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/rubocop-1.21.0/lib/rubocop/cop/bundler
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/gems/simplecov-0.17.1/lib/simplecov/profiles/bundler_filter.rb
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/bundler
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/LockfileParser/bundler_version-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/bundler_major_version-c.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/Standalone/bundler_path-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/Plugin/API/Source/bundler_plugin_api_source%3f-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/Fetcher/bundler_cert_store-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/CLI/Gem/bundler_dependency_version-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Bundler/SharedHelpers/bundler_ruby_lib-i.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Gem/BundlerVersionFinder/bundler_version_with_reason-c.ri
/Users/me/.rbenv/versions/2.7.4//share/ri/2.7.0/system/Gem/BundlerVersionFinder/bundler_version-c.ri
I cannot explain it, but the remedy is:
Remove bundler-2.2.21.gemspec from the folder that renders it default:
Reinstall the desired version.
Uninstalling bundler will not work:
-bash> gem uninstall bundler
Gem bundler-2.2.21 cannot be uninstalled because it is a default gem
Note the following line in the output of the find command above:
/Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/specifications/default/bundler-2.2.21.gemspec
Remove it in order to remove the "default" status of this gem:
rm /Users/me/.rbenv/versions/2.7.4//lib/ruby/gems/2.7.0/specifications/default/bundler-2.2.21.gemspec
Uninstalling is now impossible...
-bash> gem uninstall bundler
Gem 'bundler' is not installed
Indeed...
-bash> bundler --version
Traceback (most recent call last):
2: from /Users/me/.rbenv/versions/2.7.4/bin/bundler:23:in `<main>'
1: from /Users/me/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/Users/me/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /Users/me/Projects/kinside/kinside/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
So install the desired version:
-bash> gem install bundler:2.2.21
Successfully installed bundler-2.2.21
Parsing documentation for bundler-2.2.21
Installing ri documentation for bundler-2.2.21
Done installing documentation for bundler after 3 seconds
1 gem installed
Check:
-bash> bundler --version
Bundler version 2.2.21
-bash> gem list bundler
*** LOCAL GEMS ***
bundler (2.2.21)
when I use this command to run fastlane:
bundle exec fastlane beta
shows error:
~/Documents/GitHub/cruise-open/ios on main! ⌚ 14:59:47
$ bundle exec fastlane beta ‹ruby-3.0.0›
Could not find gem 'xcode-install' in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.
Run `bundle install` to install missing gems.
(base)
then I install xcode-install like this:
$ gem install xcode-install ‹ruby-3.0.0›
Fetching xcode-install-2.6.8.gem
Successfully installed xcode-install-2.6.8
Parsing documentation for xcode-install-2.6.8
Installing ri documentation for xcode-install-2.6.8
Done installing documentation for xcode-install after 0 seconds
1 gem installed
(base)
still not fix this problem. what should I do to fix it?
In your Gemfile you need to add this line:
gem "xcode-install"
Right after
gem "fastlane"
And run fastlane command again.
I tried to install cocoapods on mac according to the instructions http://cocoapods.org/ , but got the error as below:
$sudo gem install cocoapods
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Service Unavailable: Back-end server is at capacity 503 (https://api.rubygems.org/api/v1/dependencies?gems=cocoapods)
but sometimes, the error message is different。
$ sudo gem install cocoapods
Password:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0 RUBYLIBDIR=/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'rake' (>= 0) among 20 total gem(s) (Gem::LoadError)
from /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
from /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/rake:22:in `<main>'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /Users/tap4fun/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/gems/xcodeproj-0.17.0 for inspection.
Results logged to /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0/gem_make.out
ruby version: 1.9.3
rake version: 10.2.2
Try this (Worked for me with OSX 10.10)
Open Xcode 6
Open Preferences
Click the Locations tab
Change the Command Line Tools version to Xcode 6.0
Uninstall cocoapods
$ sudo gem uninstall cocoapods
Install xcodeproj
$ sudo gem install xcodeproj
Install cocoapods
$ sudo gem install cocoapods
Run pod --version to verify
I have ruby project and I installed all gems using 'bundle install'. Gems was installed in ./vendor/bundle. But I use ruby installed by rvm in another directory and when I try to do something (some command) It is looking for gems in rvm directory. How to install all gems in rvm directory?
Edit:
I installed all gems but when I tried to user simple ruby -T I get:
/home/arkency/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'rake' (>= 0) among 1 total gem(s) (Gem::LoadError)
from /home/arkency/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
from /home/arkency/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /home/arkency/.rvm/gems/ruby-1.9.3-p545/bin/rake:22:in `<main>'
from /home/arkency/.rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in `eval'
from /home/arkency/.rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in `<main>'
My gem list contain only:
gem list
*** LOCAL GEMS ***
bundler (1.6.2)
By default, bundler installs gems to the system gem store. However, it has an optional configuration setting to install gems into another directory (in your case vendor/bundle). These gems are then only available in the specific bundler context.
You can force bundler to install the gems into the system gem store by running
bundle install --system
thus making them available to your global ruby installation.
This is necessary as bundler remembers certain options (e.g. the path where to install gems to) in the .bundle directory besides your Gemfile.
This is happening:
Mac:~ Swanros$ sudo gem install cocoapods
+Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext RUBYLIBDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext
/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'rake' (>= 0) among 9 total gem(s) (Gem::LoadError)
from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/Swanros/.rvm/gems/ruby-2.0.0-p247/bin/rake:22:in `<main>'
Gem files will remain installed in /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0 for inspection.
Results logged to /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext/xcodeproj/gem_make.out
Mac:~ Swanros$
How could I solve this? I'm running OS X Mavericks with Xcode 5 Command Line Tools already installed.
I’ve just released xcodeproj 0.14.1 which contains a fix for this: https://github.com/CocoaPods/Xcodeproj/blob/0.14.1/CHANGELOG.md.
It should work if you try it again, or you can install the xcodeproj gem first and then try again:
$ sudo gem install xcodeproj
$ sudo gem install cocoapods
After updating Xcode 5 to Xcode 5.0.1, cocoapods can be installed successfully