We recently added fastlane to our ionic project with a gemfile. It looks like the ionic appflow build also uses fastlane. When trying to build the project within appflow we get this error
$ run "fetch-updates"
$ run "build-app"
/usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler'
(2.1.4) required by your /builds/project-0/Gemfile.lock. (Gem::MissingSpecVersionError)
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`
Checked in
'GEM_PATH=/root/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/bundle', execute
`gem env` for more information
from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in
activate_dependencies'
from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
from /usr/local/lib/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
from /usr/local/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
from /usr/local/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
from /usr/local/bundle/bin/fastlane:23:in `<main>'
Is there a way to hide this file from appflow or to tell it to not use it in it's own fastlane build? Or is my best bet to just rename this file before making a commit (really don't want to do this)?
The issue was caused by the bundler version specified in the gemfile lock being different from what our platform was using. This should be fixed now.
Related
I'm trying to install gtk3, but bundle install chokes while installing atk. Most of the responses seem to resolve around mismatched versions in the lock file. Removing the lock file doesn't help, neither does installing the matching version of bundle.
$ bundle install
Fetching gem metadata from https://rubygems.org/....
Resolving dependencies...
Using bundler 2.4.6
Fetching native-package-installer 1.1.5
Fetching pkg-config 1.5.1
Installing pkg-config 1.5.1
Installing native-package-installer 1.1.5
Fetching glib2 3.5.1
Installing glib2 3.5.1 with native extensions
Fetching atk 3.5.1
Installing atk 3.5.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1/dependency-check
rake RUBYARCHDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
RUBYLIBDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:263:in `find_spec_for_exe': can't find gem
rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
from /home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:282:in `activate_bin_path'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/rake:23:in `<main>'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `eval'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1 for inspection.
Results logged to
/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1/gem_make.out
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:102:in `run'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/rake_builder.rb:28:in `build'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:170:in `build_extension'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:204:in `block in
build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `each'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/installer.rb:843:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/source/rubygems.rb:200:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:54:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:155:in
`do_install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:146:in `block in
worker_pool'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:62:in `apply_func'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:57:in `block in process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `loop'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:90:in `block (2 levels) in
create_threads'
An error occurred while installing atk (3.5.1), and Bundler cannot continue.
In Gemfile:
atk
However, installing via gem works fine.
gem install atk -v 3.5.1
Building native extensions. This could take a while...
Successfully installed atk-3.5.1
Parsing documentation for atk-3.5.1
Done installing documentation for atk after 0 seconds
1 gem installed
This isn't a great answer, so if someone has a more in depth explanation, please feel free to give a better answer.
gem install gtk3 and bundle install use a different copy of rake.
The only difference between the two is the shebang line. The version from bundler is #!/usr/bin/env ruby_executable_hooks while the other version points to a specific version of ruby.
I'm not sure why this fails for the bundler version.
An easy workaround mentioned here: https://github.com/postmodern/digest-crc/issues/18#issuecomment-652889761 is to add gem "rake" to your Gemfile.
What must I do when I want to copy an installed gem from one installation to another one without using the gem command?
I have to install SQLite3 on a server without an internet connection. Normally I can do it with a copy of the gem-file:
gem install --local sqlite3-1.4.0.gem --platform ruby
But for SQLite3 it needs a connection to the internet to get libraries to compile some binaries. The installation worked well on a computer with an internet connection.
So my idea was to take my successful installation on the same OS and same Ruby version and copy all the related components, but this did not work.
When I called:
require 'sequel'
db = Sequel.sqlite
I got this error:
LoadError: The specified module could not be found
d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so
(Sequel::AdapterNotFound)
In the trace is:
d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': LoadError: 126: The specified module could not be found. - d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so (Sequel::AdapterNotFound)
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:2:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/adapters/sqlite.rb:3:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:88:in `load_adapter'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:17:in `adapter_class'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:45:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:121:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:399:in `adapter_method'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:406:in `block (2 levels) in def_adapter_method'
from _ruby_version.rb:21:in `<main>'
but the file exists:
What is my error?
I'm using Windows Server 2016.
I found a precompiled version of SQLite3 in a GitHub issue which works for me, but I would like to use a newer version.
Use Bundler for this.
In short:
Run gem install bundler on each machine you're using.
Maintain a project Gemfile listing all requirements
Run bundle install when your Gemfile changes and bundle update to update to latest versions. This will generate the Gemfile.lock file.
Prefix ruby execution with bundle exec, e.g. bundle exec ruby myscript or bundle exec rails c
That's a brief summary, but please read up more on Bundler. It's an essential part of modern Ruby deployment.
You need to use the package option of bundler.
First you need to cache your dependencies into vendor/cache with:
bundle package --all --all-platforms
This will install all the dependencies of your Gemfile locally, then add the directory to your source code repository.
When deploying make sure you use bundle install --local to use the local version.
See the documentation for bundle package for more information.
I am not able to load cocoapods. No matter what gem command I type in, I get the following error:
/Users/jeff//.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:315:in `to_specs':
Could not find 'encrypted_strings' (>= 0) among 18 total gem(s) (Gem::LoadError)
Checked in
'GEM_PATH=/Users/jeff/.gem/ruby/2.1.0:/Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/gems/2.1.0', execute `gem env` for more information
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:58:in `gem'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:65:in `<module:Kernel>'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:7:in `<top (required)>'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:1235:in `require'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:1235:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'
I get this error when I type any of the following:
sudo gem install cocoapods
gem uninstall cocoapods
gem env
sudo gem install encrypted_strings
My mac is running version 10.12.6 osx
I do have Ruby in my /Library. The subdirectories contains Gems/2.0.0.
Note that some time ago, I was working on another project that had me update Ruby to version ruby-2.1.5 and ruby-2.1.5-dev. These are found in "/Users/jeff/.rvm/rubies". Now if I go to "/Library/Ruby/Gems", there is a subdirectory called 2.0.0. Is there an incompatibility here?
How can I correct this problem? Should I somehow remove these versions. If so, how?
Probably version of cocoapods is running in unsupported version ruby and install again . To fix it remove all versions of cocoapods. How to do it find at answer https://superuser.com/a/686319
It can be happen after updating to new macOS version.
To prevent it happen in future use rbenv Ruby environment
rbenv allows to not use root access
Running grunt serve which use to work I'm having this error message.
Running "compass:server" (compass) task
Warning: Command failed: compass --version
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to chunky_png (1.3.4), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of chunky_png (1.3.4) has removed it. You'll need to update your bundle to a different version of chunky_png (1.3.4) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/bin/compass:6:in `<main>'
So on side I ran a compass --version and I obtain the same error Your bundle is locked to chunky_png (1.3.4), etc.
Trying to bundle install seems a bit useless...
$ bundle install
Could not locate Gemfile or .bundle/ directory
So I tried to reinstall ruby-compass because which compass sent me to /usr/bin/compass which is the one set by ruby-compass AUR package.
that did'nt solved the problem. Any idea around ?
solved by installing compass via pacgem
details of commands :
to install pacgem
cd ~/devel/aur.archlinux.org/ # or where ever you used to put your AUR
git clone https://aur.archlinux.org/pacgem.git
cd pacgem
cat PKGBUILD # at this point, it is recommended to personally check to PKGBUILD
makepkg -si
and answer y to all questions
install compass
pacgem compass
and answer y to all questions. It will install needed dependencies.
I recently switched from Linux to Mac, and while trying to run bundle on one of my previous projects, I get the error below:
System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/puma-2.14.0.gemspec (Errno::EACCES)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/bundle:22:in `<main>'
I have tried reinstalling bundler, rbenv and ruby, but I keep getting the same error. I ran the command with sudo and it works, how can I set the permission without having to use sudo
I retried with sudo now and it works. How can U make it work without sudo
To make bundler work without sudo, you should install all your gem dependencies in a local user directory (this is the recommended way)
bundle install --path vendor/bundle
Now when you run your program, bundle will find all your libraries in the new location
bundle exec ruby app.rb
If you are using git, make sure to add vendor to your .gitignore to avoid having all your gem libraries in your "new files" list.