We were using fastlane to run the CI work. Had to use AdService framework, and for that had to update Xcode. In order to do that, had to update macOS to Big Sur. After updating everything, gitlab CI stopped working:
$ bundle exec fastlane build
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
Bundler::GemNotFound: Could not find rake-13.0.3 in any of the sources
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:91:in `block in materialize'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `map!'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `materialize'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:170:in `specs'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:237:in `specs_for'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:226:in `requested_specs'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:108:in `block in definition_method'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:20:in `setup'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler.rb:107:in `setup'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/setup.rb:20:in `<top (required)>'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
So what I already tried:
in .bash_profile added:
export PATH="$HOME/.fastlane/bin:$PATH"
It did not helped. Tried :
sudo gem install fastlane -NV
That did not help either.
Also tried:
fastlane update_fastlane
And:
bundle install --path vendor/cache
Was trying to google for the solution, but unluckly can't fix that. I am an iOS dev, so this is something new to me.
Any ideas how this could be fixed?
Okey, so for the ones who are looking for a solution, after 2 days I finally found an issue. Was digging a lot, changing, installing, reinstalling etc. I thought of trying everything.
In my case, I use bash shell, so configured .bash_profile, added these lines of code:
export PATH="$HOME/.fastlane/bin:$PATH"
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
in .bashrcthere was some paths, that I commented out, and now there is only 1 line of code:
eval "$(rbenv init -)"
After doing that all works
P.S. if you are using zsh then files are different. Not 100% sure, but check .profile, .zshrc
Also I have edited gemfile.lock, as some gems were not as required, but not even sure if that was needed, as now I am not going to touch CI as it works :D
Hope that will save some time for someone in future. Else, if someone wants to add something, you are more then welcome (with some explanation would be even better, as not many of developers probably knows how all this crazy stuff works :) )
Related
I've Googled this quite a bit, and haven't found anything useful to my situation.
$ docker-compose up abc
produces the following in the logs:
/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:92:in `block in materialize': Could not find concurrent-ruby-1.0.5 in any of the sources (Bundler::GemNotFound)
from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `map!'
from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `materialize'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:132:in `specs'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:177:in `specs_for'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:166:in `requested_specs'
from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
from /usr/lib/ruby/vendor_ruby/bundler.rb:121:in `setup'
from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
The relevant bit from my docker-compose.yml file:
command: bundle exec rails server
concurrent-ruby is most definitely installed, exactly where it needs to be. I've run bundle install inside Docker so many times, and I've tried adding gem install concurrent-ruby -v 1.0.5 to my docker-compose command, and it installs just fine, and then still complains that it can't find the gem. I tried adding bundle install directly to my docker-compose command, and that fails because of some known issue involving docker-compose and git (I'm using two internal gems). [ EDIT: https://github.com/docker/compose/issues/2856#issuecomment-236625662 ]
Everything worked fine until I upgraded some Ruby gems, but I'm not sure why or how to fix it.
I had an issue similar to this outside of Docker.
I deleted the Gemfile.lock and ran bundle.
Issue went away.
Your mileage may vary.
I had this same error with docker-compose. Apparently, it was installing the gem, after running docker-compose run backend bundle install the Gemfile.lock file was updated correctly. Still, it would continue displaying this error either for this gem or others.
Turns out that in some cases just running bundle install with docker is not enough. As specified in the documentation here: https://docs.docker.com/compose/rails/ sometimes after running bundle install you need to rebuild the images. This fixed my problem:
docker-compose run backend bundle install
docker-compose build
tl;dr: Set GEM_HOME = BUNDLE_PATH
Since you're using docker, I also assume you are maybe changing the value of BUNDLE_PATH so you can cache the gems? If so, you'll also want to set the GEM_HOME variable to this value.
I can't exactly explain why. My theory is that.. something.. is incorrectly using the value of GEM_HOME when it should be using BUNDLE_PATH, and thus the gems you installed from your rails project's Gemfile are not there.
It's common to cache your bundle with docker. If you're doing that, and you updated some gems you'll bump into this problem.
Delete volume and docker-compose up again.
docker volume ls
Then:
docker volume rm <vol name>
Nothing will make it work unless you reinstall the metasploit-framework. I have been facing the issue for 1 week. I have personally tried and its running now.
$ pkg upgrade && pkg install git && pkg install curl && pkg install
wget && pkg install nmap && curl -LO
raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
&& chmod 777 metasploit.sh && ./metasploit.sh
I am trying to build calabash-android in my mac i am getting the following error
sudo calabash-android build /Users/igate/Downloads/SimpleCreditCardValidator/app/app-release.apk
ERROR: Could not find an Android SDK please make sure it is installed.
ERROR: You can read about how Calabash is searching for an Android SDK and how you can help here:
ERROR: https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites
/Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/dependencies.rb:114:in `setup': Could not find an Android SDK (RuntimeError)
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/dependencies.rb:41:in `java_dependencies'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/dependencies.rb:81:in `keytool_path'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/helpers.rb:186:in `block (2 levels) in fingerprint_from_apk'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/helpers.rb:169:in `chdir'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/helpers.rb:169:in `block in fingerprint_from_apk'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:88:in `mktmpdir'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/lib/calabash-android/helpers.rb:168:in `fingerprint_from_apk'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/bin/calabash-android-build.rb:2:in `calabash_build'
from /Library/Ruby/Gems/2.0.0/gems/calabash-android-0.8.0/bin/calabash-android:71:in `<top (required)>'
from /usr/bin/calabash-android:23:in `load'
from /usr/bin/calabash-android:23:in `<main>'
I also checked my bash_profile for SDK it is perfectly fine as below
export ANDROID_HOME="/Users/igate/Library/Android/sdk"
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
as suggested on Calabash installation docs you should not use sudo neither when you install or when you use gems:
You should never install gems with sudo. If you are having issues
installing bundler, we recommend using the Calabash Sandbox or using a
managed version of Ruby, e.g. rbenv or rvm.
In addition, coming back to Android SDK, make sure you download the right SDK from here, unzip the file anywhere you want and insert into your .bash_profile the right paths.
For example, these are mines (I have unzipped folder into ~/Documents):
export ANDROID_HOME="$HOME/Documents/android-sdk-macosx"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
and it works like a charm
After installing RVM the other day I can no longer use compass watch as I could.
I've tried updating the system, installing compass again, as well as sass, all to no avail.
Here's the error I get in Terminal:
/Users/john/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/definition.rb:16:in `build': /Gemfile not found (Bundler::GemfileNotFound)
from /Users/john/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
from /Users/john/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup'
from /Users/john/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/john/.rvm/gems/ruby-2.0.0-p247/gems/compass-0.12.2/bin/compass:26:in `<top (required)>'
from /Users/john/.rvm/gems/ruby-2.0.0-p247/bin/compass:23:in `load'
from /Users/john/.rvm/gems/ruby-2.0.0-p247/bin/compass:23:in `<main>'
from /Users/john/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
from /Users/john/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
I've attempted to use bundle update sass-rails per this question, but get the error Could not locate Gemfile
I've also tried to follow the advise here to no avail.
At this point I'm a bit lost. I'm brand new to the Ruby world as well as RVM, and am not the most proficient Terminal user to begin with.
Thanks for any assistance or insight-
/Gemfile not found was a bug in older version of rubygems-bundler gem, run:
rvm #global do gem update rubygems-bundler
and it should work fine
I don't have the answer as to how to fix the problem itself, but I did go through with simply removing it for the time being.
I used rvm implode to remove rvm from my machine per this post.
Everything worked fine after that. Unfortunately that'll delay my experimenting with the Ruby world for a little while longer as I don't have time to figure out how to have RVM without the complications it seemingly brought.
Best,
I'm trying to get Octopress (http://octopress.org/) working, but I'm having some issues.
I'm using POW (http://pow.cx/) and it seems to not load the correct Ruby version for me (using RVM).
It always uses the RVM default ruby version and not the one specified in .rvmrc. My default Ruby version in RVM is: ruby-1.9.3-p125.
In my .rvmrc file I have this: rvm use 1.9.2
I get this error in the browser when visiting my site:
LoadError: cannot load such file -- bundler/setup
~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
~/Sites/Lejnus/lejnus/config.ru:1:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
~/Sites/Lejnus/lejnus/config.ru:1:in `new'
~/Sites/Lejnus/lejnus/config.ru:1:in `<main>'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/server.rb:50:in `eval'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/server.rb:50:in `load_config'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/server.rb:43:in `initialize'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/server.rb:13:in `new'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/nack/server.rb:13:in `run'
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/bin/nack_worker:4:in `<main>'
Why is it using 1.9.3-p125 when 1.9.2 is specified in my .rvmrc file? If I set 1.9.2 as default it works of course...
Isn't it supposed to do this magic for me and use the correct ruby versions?
Ok, seems like POW is moving away from RVM.
I needed to run this in my projects root to get it working:
rvm env . -- --env > .powenv
i've sorted the problem by adding a .powrc at the root of the project with the following code
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then
source "$rvm_path/scripts/rvm"
source ".rvmrc"
fi
[Edited to add: This is recommended in the Pow documentation]
This is what solved the problem for me:
rvm env -- `rvm current` > .powenv
You can also create a rvm hook (as commented here) for switching the .powenv automatically when you change the current ruby env:
# ~/.rvm/hooks/after_use_update_powrc
for file in `ls ~/.pow/` ; do
POW_LINK_TARGET=`readlink ~/.pow/$file`
if [ `pwd` = $POW_LINK_TARGET ]; then
rvm env -- ``rvm current`` > .powenv
fi
done
Don't forget to make it executable:
chmod +x ~/.rvm/hooks/after_use_update_powrc
Can anyone suggest how to fix this (Ubuntu 9.10):
/home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler/shared_helpers.rb:42:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler/shared_helpers.rb:51:in `env_file'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:143:in `env_file'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:174:in `update_env_file?'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:95:in `load'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:76:in `gem_setup'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/merb-core-1.1.2/bin/merb:10:in `rescue in <top (required)>'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/merb-core-1.1.2/bin/merb:3:in `<top (required)>'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/bin/merb:19:in `load'
from /home/chris/.rvm/gems/ruby-1.9.1-p378/bin/merb:19:in `<main>'
Thank
Chris
Update
I tried really hard to get this to work. Eventually I fell back to merb-core 1.0.12 and that worked fine.
Solution
I needed to write a Gemfile for my application and drop it into the root directory for the app.
I was upgrading across too many versions of Merb! My application was a flat, Rack application originally developed with a much older version of Merb. It didn't have (or need) a Gemfile. When I ran it against the latest Merb, the error was thrown. It would have been better if it said 'I can't find the Gemfile for your application'
I ran merb-gen to get a basic Gemfile and updated it with my own requirements.
Hope that helps someone!
Looks like you need a gem, and a dependency to build that gem.
This might help, it helped me: postgres
(on ubuntu)
sudo apt-get install ruby-full build-essential postgresql-server-dev-8.3 (or 8.4)
sudo gem install postgres
heroku uses postgresql-server-dev-8.3 if you're deploying there.