Tests in circleci wont pass after upgrading ruby and heroku to 20 from 18 - ruby-on-rails-3

I am currently working on an app that uses ruby on rails on the backend and react.js on the front end.
Since Heroku 18 is ending, I decided to start the upgrade to Heroku 20 which will be available till 2025. Since doing so, I have been banging my head against the wall for 2 days. I have updated my dependancies as I believe fit based on documentation, but now 3 of my tests keep failing (using selenium-webdriver, webdriver, and capybarra). The error thrown shows this:
Failures:
1) Posts create post
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/beneficiary/posts/post_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
2) donor dashboard should have nav elements
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/donor/dashboard_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
3) Posts create post
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/donor/posts/post_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
In the file auth_helper, the format for the fill_in seems to be the issue, but looking at the documentation and confirming the id for user_email to be correct, I don't really understand what is happening at all. I feel like this might be a red herring as it really doesn't seem to be an issue on other tests that use the same method login_as. I tried upping the capybarra timeout time limit as well, and it still seems to fail to the page is certainly loading.
These tests are also passing locally, and only fail when i run them through circleci, which has me baffled and without much understanding of what to try next.
def login_as(user, password: "password")
visit root_path
find('a', text: 'Login').click
fill_in :user_email, with: user.email
fill_in :user_password, with: password
find("input[value='Log in']").click
end
The referenced lines in rails_helper are databaseCleaner and example run lines below:
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
My config.yml is:
# CircleCI 2.0 configuration file
version: 2.1
orbs:
browser-tools: circleci/browser-tools#1.4.0
jobs:
build:
docker:
# specify the version you desire here
- image: cimg/ruby:3.0.5-browsers # circleci/ruby:2.7.0-node-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: $HEROKU_APP_NAME
RAILS_ENV: test
BUNDLER_VERSION: 2.0.2
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:9.5-alpine
environment:
POSTGRES_USER: $HEROKU_APP_NAME
POSTGRES_DB: $HEROKU_APP_NAME_test
POSTGRES_PASSWORD: $HEROKU_APP_NAME
- image: redis:4.0.10
working_directory: ~/repo
steps:
- checkout
- browser-tools/install-browser-tools
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v14
nvm alias default 14.21.1
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Configure Bundler
command: |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
source $BASH_ENV
gem install bundler
- run:
name: install dependencies
command: |
bundle config set --local path 'vendor/bundle'
bundle install --jobs=4 --retry=3
# --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
# Database setup
- run: bundle exec rails db:create
- run: bundle exec rails db:schema:load
# frontend
- restore_cache:
keys:
- sell-more-yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- sell-more-yarn-cache-{{ .Branch }}-
- sell-more-yarn-cache-
- run:
name: Yarn Install
command: |
yarn --ignore-engines --cache-folder ~/.cache/yarn
- save_cache:
key: sell-more-yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Webpacker Pre-Compile
command: bundle exec rails webpacker:compile
# run tests!
- run:
name: run tests
command: |
bundle exec rspec --profile 10 \
--out test_results/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
workflows:
version: 2
build-and-deploy:
jobs:
- build
Versions:
ruby '3.0.5'
gem 'rails', '~> 6.1'
group :test do
gem 'capybara', '~> 3.38'
gem 'database_cleaner'
gem 'factory_bot_rails', '~> 6.2.0'
gem 'rack_session_access'
gem 'rails-controller-testing'
gem 'rspec-rails'
gem 'selenium-webdriver', '~> 4.0'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'shoulda-matchers', '~> 4.4'
gem 'spring-commands-rspec'
gem 'stripe-ruby-mock', github: 'rebelidealist/stripe-ruby-mock'
gem 'timecop'
gem 'webdrivers', '~> 5.2'
gem 'webmock'
end
Anyone have any ideas to help me get past this as I am falling behind on time and could really use a point in the right direction!
Thanks in advance!
I am expecting these tests to pass as they can locally and should be able to on circleci as they were right before the upgrade.

Related

Cannot install Pod file in React native || Mac M1

I have created a test app for my study, and developing it in my Mac M1 machine. I have installed some npm libraried for UI and UX components. Somewhere I need to install/update pod file for that specific npm library. In that case, I am getting this strage error whenever I run pod install.
What could be the reason?
Already tried these comments.
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install --repo-update
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `AwesomeProjec1t`: RNCMaskedView,
RNFBApp, RNFBAuth, RNFBFirestore, RNFBStorage, RNGestureHandler, RNGoogleSignin,
RNImageCropPicker, RNScreens, RNVectorIcons, react-native-fbsdk-next, and react-native-safe-area-context
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Updating local specs repositories
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/local/bin/pod install --repo-update
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.11.3
Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
RubyGems : 3.0.3.1
Host : macOS 12.2.1 (21D62)
Xcode : 13.4 (13F17a)
Git : git version 2.32.1 (Apple Git-133)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
```
### Plugins
```
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
cocoapods-user-defined-build-types : 0.0.7
```
### Podfile
```ruby
install! 'cocoapods', :deterministic_uuids => false
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform- ios/native_modules'
platform :ios, '11.0'
target 'AwesomeProjec1t' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'AwesomeProjec1tTests' do
inherit! :complete
# Pods for testing
end
use_frameworks! :linkage => :static
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
```
### Error
```
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle,
0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:5:in rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:2:in <top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon.rb:3:in <top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in <top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:372:in download_and_save_with_retries_async' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:365:in download_file_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:338:in download_file' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:78:in deprecated_local_podspecs'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:60:in preheat_existing_files' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:257:in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:144:in block (3 levels) in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:143:in block (2 levels) in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:142:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:142:in block in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:140:in open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:140:in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:145:in block in update_repositories'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:143:in each' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:143:in update_repositories'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:237:in block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:236:in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>'
/usr/local/bin/pod:23:in load' /usr/local/bin/pod:23:in '
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search? q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64e%27%29%29%2C+%27%2Fusr%2Flib%2Fffi_c.bundle%27+%28no+such+file%29+- +%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass

CIRCLE CI: --- Redis::CannotConnectError:

When I run my rspec tests locally everything passes, but when I run them on Circle CI I get the rspec error: Redis::CannotConnectError:.
I recently added feature tests for SideKiq. It uses Redis and Chrome Driver.
I think I need to add the redis build into my cimg, but not sure how to do that.
Rspec Test Results
Failures:
1) Sidekiq::Web with admin user can able to access sidekiq GUI
Failure/Error: raise CannotConnectError, "Error connecting to Redis on #{location} (#{error.class})"
Redis::CannotConnectError:
Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:362:in `rescue in establish_connection'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:343:in `establish_connection'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:107:in `block in connect'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:308:in `with_reconnect'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:106:in `connect'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:381:in `ensure_connected'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:233:in `block in process'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:320:in `logging'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:232:in `process'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis/client.rb:126:in `call'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis.rb:305:in `block in info'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis.rb:69:in `block in synchronize'
# /usr/local/lib/ruby/2.7.0/monitor.rb:202:in `synchronize'
# /usr/local/lib/ruby/2.7.0/monitor.rb:202:in `mon_synchronize'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis.rb:69:in `synchronize'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/redis-4.2.2/lib/redis.rb:304:in `info'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq.rb:120:in `block in redis_info'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq.rb:98:in `block in redis'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/connection_pool-2.2.3/lib/connection_pool.rb:63:in `block (2 levels) in with'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/connection_pool-2.2.3/lib/connection_pool.rb:62:in `handle_interrupt'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/connection_pool-2.2.3/lib/connection_pool.rb:62:in `block in with'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/connection_pool-2.2.3/lib/connection_pool.rb:59:in `handle_interrupt'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/connection_pool-2.2.3/lib/connection_pool.rb:59:in `with'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq.rb:95:in `redis'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq.rb:114:in `redis_info'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/helpers.rb:171:in `redis_info'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/application.rb:46:in `block in <class:WebApplication>'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/application.rb:296:in `instance_exec'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/application.rb:296:in `block in call'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/application.rb:294:in `catch'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/application.rb:294:in `call'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/csrf_protection.rb:52:in `admit'
# /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.1.2/lib/sidekiq/web/csrf_protection.rb:41:in `call'
# --- Caused by: ---
# IO::EINPROGRESSWaitWritable:
# Operation now in progress - connect(2) would block
# /usr/local/lib/ruby/2.7.0/socket.rb:1214:in `__connect_nonblock'
config.yml for CirclCI
version: 2.1
orbs:
browser-tools: circleci/browser-tools#1.1
jobs:
build:
parallelism: 1
docker:
- image: cimg/ruby:2.7.3-browsers
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
PGHOST: 127.0.0.1
PGUSER: myapp
RAILS_ENV: test
CAPYBARA_DEFAULT_MAX_WAIT_TIME: 10
- image: circleci/postgres:9.5-alpine # database image
environment: # environment variables for database
POSTGRES_USER: myapp
POSTGRES_DB: myapp
POSTGRES_PASSWORD: mypass
steps:
- browser-tools/install-browser-tools
- checkout
- run:
name: Install NVM
command: |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV && echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
- run:
name: Install NodeJS
command: nvm install 8.9.1
- run:
name: Install bundler 2.0.2
command: gem install bundler:2.0.2
- run:
name: Which bundler?
command: bundle -v
- run:
name: Which Google Chrome?
command: google-chrome --version
- restore_cache:
keys:
- myapp-{{ checksum "Gemfile.lock" }}
- myapp-
- run:
name: Bundle Install
command: bundle check || bundle install
- save_cache:
key: myapp-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Database setup
command: bin/rails db:drop && bin/rails db:create && bin/rails db:migrate
- run:
name: Precompile Assets
command: bundle exec rake assets:precompile
- run:
name: Run rspec
command: bundle exec rspec spec
In the test environment, typically it's best not to queue jobs in Redis at all. This doc has info on how to configure Sidekiq in your tests.
https://github-wiki-see.page/m/mperham/sidekiq/wiki/Testing

Running into issues installing gitlab-shell

I am trying to install Gitlab CE from source and following this installation guide.
When I attempt to install the gitlab-shell using the command provided.
sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true
I received the following stack trace error.
WARNING: This version of GitLab depends on gitlab-shell 4.1.1, but you're running Unknown. Please update gitlab-shell.
rake aborted!
Gitlab::TaskFailedError: Gitlab::TaskFailedError
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:87:in `run_command!'
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:164:in `clone_repo'
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:157:in `checkout_or_clone_tag'
/home/git/gitlab/lib/tasks/gitlab/shell.rake:16:in `block (3 levels) in <top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => gitlab:shell:install
What config file should I be modifying to fix my issue? Do I need to modify the Redis URL even though I am using the default configuration? By the way, this install is on an Ubuntu 16.04 server.
This might be caused by using a version of git that is too old.
To debug: append the --trace option to bundle exec to get more info on where this error is coming from and inspect the source.

Installed ruby gem(NMatrix) not showing in irb

I have installed ruby gem nmatrix with the command below:
sudo gem install nmatrix
I have installed it in ubuntu 12.04 . My gem env is as below:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-05-15 patchlevel 429) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.3-p429
- /usr/local/rvm/gems/ruby-1.9.3-p429#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com/", "http://rubygems.org"]
- REMOTE SOURCES:
- http://gems.github.com/
- http://rubygems.org
Now when I go to irb and run code as below,to use NMatrix it gives error as :
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'nmatrix'
LoadError: cannot load such file -- nmatrix
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):2
from /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/irb:13:in `<main>'
irb(main):003:0>
So what should I do to use nMatrix gem I just installed. Also when i do
gem list
It is not showing nmatrix gem.
Doing
sudo gem list
only shows nmatrix gem.
Thanks.

Cocoa Pods 'No such file or Directory' Error

I have an IOS project that uses cocoapods. After switching computers and updating the OS on the new computer I am getting the following error when I try running "pod update"
Robbys-iMac-454:ios-v2 robbykmyers$ pod update
Update all pods
Analyzing dependencies
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory - /Users/robbykmyers/.cocoapods/repos (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `foreach'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `children'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:63:in `all'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:130:in `repo_information'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:58:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
Does anyone know how to solve this?
Delete the folder ~/.cocoapods/ with rm -rf ~/.cocoapods
Enter pod setup command in Terminal.
This process will take time as this command clones the CocoaPods Specs repository into ~/.cocoapods/ on your computer.
It sometimes occurs when using a wrong apostrophe character in a Podfile or in a Podspec
Those apostrophes are default when using standard TextEdit app on OS X. I prefer Sublime Text to avoid such errors
https://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
rm -fr ~/Library/Caches/CocoaPods && \
gem update --system && \
gem update && \
gem cleanup && \
pod setup