My ror app runs on rails 2.3.5(which requires rack 1.0.1),
thin on heroku activates rack 1.1.0 by default
and throws error:
" You have already activated rack 1.1.0, but your Gemfile requires rack 1.0.1. Consider using bundle exec."
my Gemfile:
source 'http://rubygems.org'
group :test, :development do
gem "rack","1.0.1"
end
gem "rails","2.3.5"
gem "mysql"
gem "rake", "0.8.3"
gem "declarative_authorization", "0.5.2"
gem "searchlogic"
gem "prawn", "0.6.3"
gem "thin","1.2.11"
group :test, :development do
gem "rack","1.0.1"
end
group :development do
# bundler requires these gems in development
# gem "rails-footnotes"
end
group :test do
# bundler requires these gems while running tests
# gem "rspec"
# gem "faker"
end
----------------------
I installed bundler and developed Gemfile.lock :
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.5)
actionpack (= 2.3.5)
actionpack (2.3.5)
activesupport (= 2.3.5)
rack (~> 1.0.0)
activerecord (2.3.5)
activesupport (= 2.3.5)
activeresource (2.3.5)
activesupport (= 2.3.5)
activesupport (2.3.5)
daemons (1.1.4)
declarative_authorization (0.5.2)
eventmachine (0.12.10)
mysql (2.8.1)
prawn (0.6.3)
prawn-core (>= 0.6.3, < 0.7)
prawn-format (>= 0.2.3, < 0.3)
prawn-layout (>= 0.3.2, < 0.4)
prawn-security (>= 0.1.1, < 0.2)
prawn-core (0.6.3)
prawn-format (0.2.3)
prawn-core
prawn-layout (0.3.2)
prawn-security (0.1.1)
rack (1.0.1)
rails (2.3.5)
actionmailer (= 2.3.5)
actionpack (= 2.3.5)
activerecord (= 2.3.5)
activeresource (= 2.3.5)
activesupport (= 2.3.5)
rake (>= 0.8.3)
rake (0.8.3)
searchlogic (2.4.28)
activerecord (>= 2.0.0)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
PLATFORMS
ruby
DEPENDENCIES
declarative_authorization (= 0.5.2)
mysql
prawn (= 0.6.3)
rack (= 1.0.1)
rails (= 2.3.5)
rake (= 0.8.3)
searchlogic
thin (= 1.2.11)
---------------------------
Please help me deploy it on heroku........
Solved it...
my app uses rack 1.0.1 , rails 2.3.5
and heroku activates rake 1.1.0 by default..
so i switched my rails app version to 2.3.11 which uses rack 1.1.2 in environment.rb and created a Gem file,
installed bundler
tested on my laptop...
generated lock file and pushed it to heroku...
finally worked....
took a week to get my app working...
:)
Related
After run rake db:migration I do rake db:migrate, but I don't see in console 'create table...' and when I run sqlite3 .tables , I don't see table
I don't know how to solve this problem. I tried various variants, but not results...
app.rb
require 'rubygems'
require 'sinatra'
require 'sinatra/reloader'
require 'sinatra/activerecord'
set :database, 'sqlite3:barbershop.db'
class Client < ActiveRecord::Base
end
Rakefile:--------------------------
require "./app"
require "sinatra/activerecord/rake"
migration:
class CreateClients < ActiveRecord::Migration[7.0]
def change
create_table :client do |t|
t.text :name
t.text :phone
t.text :datestamp
t.text :barber
t.text :color
end
end
end
Gemfile:-----------------------
source "https://rubygems.org"
gem "sinatra"
gem "sqlite3"
gem "activerecord"
gem "sinatra-activerecord"
gem "sinatra-contrib"
gem "rake"
gem "puma"
group :development do
gem "tux"
end
Gemfile.lock:------------------
GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.4.2)
activesupport (= 7.0.4.2)
activerecord (7.0.4.2)
activemodel (= 7.0.4.2)
activesupport (= 7.0.4.2)
activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
backports (3.23.0)
bond (0.5.1)
concurrent-ruby (1.2.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
mini_portile2 (2.8.1)
minitest (5.17.0)
multi_json (1.15.0)
nio4r (2.5.8)
puma (6.1.0)
nio4r (~> 2.0)
rack (1.5.2)
rack-protection (1.5.1)
rack
rack-test (0.6.3)
rack (>= 1.0)
rake (13.0.6)
ripl (0.7.1)
bond (~> 0.5.1)
ripl-multi_line (0.3.1)
ripl (>= 0.3.6)
ripl-rack (0.2.1)
rack (>= 1.0)
rack-test (~> 0.6.2)
ripl (>= 0.7.0)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-activerecord (2.0.26)
activerecord (>= 4.1)
sinatra (>= 1.0)
sinatra-contrib (1.4.7)
backports (>= 2.0)
multi_json
rack-protection
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sqlite3 (1.6.0)
mini_portile2 (~> 2.8.0)
sqlite3 (1.6.0-x64-mingw32)
tilt (1.4.1)
tux (0.3.0)
ripl (>= 0.3.5)
ripl-multi_line (>= 0.2.4)
ripl-rack (>= 0.2.0)
sinatra (>= 1.2.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
activerecord
puma
rake
sinatra
sinatra-activerecord
sinatra-contrib
sqlite3
tux
BUNDLED WITH
2.4.3
The docker image "web" seems to fail as the image is built with the following error code:
web_1 | Traceback (most recent call last):
web_1 | 2: from /usr/local/bin/bundle:23:in `<main>'
web_1 | 1: from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
web_1 | /usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.2.24) required by your /prospector/Gemfile.lock. (Gem::GemNotFoundException)
web_1 | To update to the latest version installed on your system, run `bundle update --bundler`.
web_1 | To install the missing version, run `gem install bundler:2.2.24`
prospector_web_1 exited with code 1
Docker complains that it can't find the correct version of bundler, but you can see from the output below that I clearly do have the correct versions of bundler installed:
masonmings#macbook-pro-10 prospector % rvm --version
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
masonmings#macbook-pro-10 prospector % ruby --version
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin20]
masonmings#macbook-pro-10 prospector % docker --version
Docker version 20.10.7, build f0df350
masonmings#macbook-pro-10 prospector % bundle --version
Bundler version 2.2.24
masonmings#macbook-pro-10 prospector % which ruby
/Users/masonmings/.rvm/rubies/ruby-2.6.5/bin/ruby
masonmings#macbook-pro-10 prospector % which bundle
/Users/masonmings/.rvm/gems/ruby-2.6.5/bin/bundle
masonmings#macbook-pro-10 prospector % bundler --version
Bundler version 2.2.24
masonmings#macbook-pro-10 prospector % which bundler
/Users/masonmings/.rvm/gems/ruby-2.6.5/bin/bundler
I've run the error message's suggested commands, but they don't help either. I've tried following the instructions on [this page][1], [this page][2], [this page][3], and several others but can't seem to find this issue solved online. I've also uninstalled, removed, and rebundled everything. Any help at all would be appreciated. Thanks!
Here's some more context:
The docker-compose.yml file for this image is as follows:
web:
build:
context: ./
dockerfile: ./docker/Dockerfile-web
env_file:
- .env
command: bundle exec rails s -p 3000 -b '0.0.0.0'
# command: tail -f /dev/null # Keeps container running
volumes:
- ./:/prospector
- ./tmp/bundle:/bundle # Gem cache
ports:
- 3000:3000 # Server
depends_on:
- postgres
- redis
links:
- postgres
- redis
- selenium
restart: always
stdin_open: true # Allows attaching for byebug
tty: true # Allows attaching for byebug
Dockerfile-web looks like this:
###
# Dockerfile for web service, which is effectively our Rails app
#
# Based on: https://docs.docker.com/compose/rails/#define-the-project
# Use Ruby 2.6.5 Image
FROM ruby:2.6.5
# Install essentials
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
# Install NodeJS
# https://github.com/nodesource/distributions#installation-instructions
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt-get install -y nodejs
# Copy contents into
RUN mkdir /prospector
WORKDIR /prospector
COPY ./ /app
# Set entrypoint script, required for caching gems (so not to have redownload & rebuild every build)
# See https://medium.com/#cristian_rivera/cache-rails-bundle-w-docker-compose-45512d952c2d
COPY ./docker/docker-entrypoint-web.sh /
RUN chmod +x /docker-entrypoint-web.sh
ENTRYPOINT ["/docker-entrypoint-web.sh"]
# Set env variables for caching gems
ENV BUNDLE_PATH=/bundle
ENV BUNDLE_BIN=/bundle/bin
ENV GEM_HOME=/bundle
ENV PATH="${BUNDLE_BIN}:${PATH}"
.zshrc looks like this:
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export Path="$PATH:$HOME/.rvm"
.bashrc looks like this:
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export PATH="$PATH:$HOME/.rvm"
export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")
The output of bundle env is:
Environment
Bundler 2.2.24
Platforms ruby, x86_64-darwin-20
Ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin20]
Full Path /Users/masonmings/.rvm/rubies/ruby-2.6.5/bin/ruby
Config Dir /Users/masonmings/.rvm/rubies/ruby-2.6.5/etc
RubyGems 3.2.24
Gem Home /Users/masonmings/.rvm/gems/ruby-2.6.5
Gem Path /Users/masonmings/.rvm/gems/ruby-2.6.5:/Users/masonmings/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
User Home /Users/masonmings
User Path /Users/masonmings/.gem/ruby/2.6.0
Bin Dir /Users/masonmings/.rvm/gems/ruby-2.6.5/bin
Tools
Git 2.30.1 (Apple Git-130)
RVM 1.29.12-next (master)
rbenv not installed
chruby not installed
rubygems-bundler (1.4.5)
Bundler Build Metadata
Built At 2021-07-15
Git SHA d78b1ee235
Released Version true
Bundler settings
cache_all
Set for your local app (/Users/masonmings/Camber Code/prospector/.bundle/config): true
Gemfile
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Application
gem 'rails', '~> 5.2.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'pg', '>= 0.18', '< 2.0' # Use postgresql as the database for Active Record
gem 'puma', '~> 3.11' # Use Puma as the app server
gem 'sass-rails', '~> 5.0' # Use SCSS for stylesheets
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'turbolinks', '~> 5' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'jbuilder', '~> 2.5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'redis', '~> 4.0' # Use Redis adapter to run Action Cable in production
gem 'bootsnap', '>= 1.1.0', require: false # Reduces boot times through caching; required in config/boot.rb
gem 'sidekiq', '~> 5.2', '>= 5.2.7' # Simple, efficient background processing for Ruby.
# Data
gem 'enumerize', '~> 2.3', '>= 2.3.1' # Enums / Enumerated attributes with I18n
gem 'rails-settings-cached', '~> 2.0', '>= 2.0.3' # Settings plugin for Rails that makes managing a table of global key, value pairs easy
gem 'chronic', '~> 0.10.2' # Natural language date/time parser
gem 'kaminari', '~> 1.1', '>= 1.1.1' # Cclean, powerful, agnostic, customizable and sophisticated paginator
# UI
gem 'bootstrap', '~> 4.3', '>= 4.3.1' # Bootstrap, as we all know too well
gem 'jquery-rails', '~> 4.3', '>= 4.3.3' # JQuery for Rails
gem 'rouge', '~> 3.7' # Code highlighter
# Authentication
gem 'omniauth', '~> 1.9' # OmniAuth is a flexible authentication system utilizing Rack middleware
gem 'omniauth-google-oauth2' # A Google OAuth2 strategy for OmniAuth 1.x. This allows you to login to Google
# Services
gem 'google-cloud-bigquery' # Google Big Query
gem 'sentry-raven' # Sentry exception monitoring service
gem 'pipedrive.rb', github: 'amoniacou/pipedrive.rb', ref: '1000a6f' # Pipedrive.com API Wrapper
# Utility
gem 'dotenv-rails' # Load environment variables from `.env`
gem 'httparty', '~> 0.17.0' # Makes http fun again!
gem 'annotate', '~> 2.7', '>= 2.7.5' # Annotates Rails/ActiveRecord Models
gem 'net-ssh', '~> 5.2' # Pure Ruby implementation of the SSH2 client protocol
gem 'highline', '~> 2.0', '>= 2.0.2' # A high level command-line oriented interface
# Scraping
gem 'watir', '~> 6.16', '>= 6.16.5' # Interact with browsers the same way people do!
gem 'watir-webdriver-performance' # Collects and summarises metrics for Watir
gem 'capybara', '>= 2.15' # Acceptance test framework for web applications
gem 'selenium-webdriver' # A browser automation framework and ecosystem
gem 'webdrivers', '~> 4.0' # Keep your Selenium WebDrivers updated automatically
# Development & Test
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] # Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'pry'
end
# Development
group :development do
gem 'capistrano', '~> 3.11', require: false # Utility and framework for executing commands in parallel via SSH (read: deploying)
gem 'capistrano-decompose', github: 'Whelton/capistrano-decompose', ref: '030b9c5' # Capistrano plugin to deploy your application inside docker containers with docker compose
gem 'web-console', '>= 3.3.0' # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '>= 3.0.5', '< 3.2' # Listens to file modifications and notifies you about the changes
gem 'spring' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring-watcher-listen', '~> 2.0.0' # Spring x Listen
end
Gemfile.lock
GIT
remote: https://github.com/Whelton/capistrano-decompose.git
revision: 030b9c5b96ef03d411aa1a9de661e4ef2041bff1
ref: 030b9c5
specs:
capistrano-decompose (0.2.0)
capistrano (~> 3.5)
GIT
remote: https://github.com/amoniacou/pipedrive.rb.git
revision: 1000a6f930a55ad81d96f876478c6fc3bf38a28a
ref: 1000a6f
specs:
pipedrive.rb (0.1.0)
activesupport (>= 4.0.0)
faraday
faraday_middleware
hashie (>= 3.0)
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.6)
actionpack (= 5.2.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.6)
actionview (= 5.2.6)
activesupport (= 5.2.6)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.6)
activesupport (= 5.2.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.6)
activesupport (= 5.2.6)
globalid (>= 0.3.6)
activemodel (5.2.6)
activesupport (= 5.2.6)
activerecord (5.2.6)
activemodel (= 5.2.6)
activesupport (= 5.2.6)
arel (>= 9.0)
activestorage (5.2.6)
actionpack (= 5.2.6)
activerecord (= 5.2.6)
marcel (~> 1.0.0)
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
annotate (2.7.5)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 13.0)
arel (9.0.0)
autoprefixer-rails (10.2.5.1)
execjs (> 0)
bindex (0.8.1)
bootsnap (1.7.5)
msgpack (~> 1.0)
bootstrap (4.6.0)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4)
byebug (11.1.3)
capistrano (3.16.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capybara (3.35.3)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
chronic (0.10.2)
coderay (1.1.3)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
crass (1.0.6)
declarative (0.0.20)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
enumerize (2.4.0)
activesupport (>= 3.2)
erubi (1.10.0)
execjs (2.8.1)
faraday (1.5.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.15.3)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-apis-bigquery_v2 (0.15.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-cloud-bigquery (1.34.0)
concurrent-ruby (~> 1.0)
google-apis-bigquery_v2 (~> 0.1)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
googleauth (0.16.2)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
hashie (4.1.0)
highline (2.0.3)
httparty (0.17.3)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jbuilder (2.11.2)
activesupport (>= 5.0.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jwt (2.2.3)
kaminari (1.2.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
actionview
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
activerecord
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.10.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
memoist (0.16.2)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0704)
mini_mime (1.1.0)
mini_portile2 (2.5.3)
minitest (5.14.4)
msgpack (1.4.2)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (5.2.0)
nio4r (2.5.7)
nokogiri (1.11.7)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
oauth2 (1.4.7)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-google-oauth2 (0.8.2)
jwt (>= 2.0)
oauth2 (~> 1.1)
omniauth (~> 1.1)
omniauth-oauth2 (>= 1.6)
omniauth-oauth2 (1.7.1)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
os (1.1.1)
pg (1.2.3)
popper_js (1.16.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (3.12.6)
racc (1.5.2)
rack (2.2.3)
rack-protection (2.1.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.6)
actioncable (= 5.2.6)
actionmailer (= 5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
activemodel (= 5.2.6)
activerecord (= 5.2.6)
activestorage (= 5.2.6)
activesupport (= 5.2.6)
bundler (>= 1.3.0)
railties (= 5.2.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-settings-cached (2.7.1)
rails (>= 5.0.0)
railties (5.2.6)
actionpack (= 5.2.6)
activesupport (= 5.2.6)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.3)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.1.4)
regexp_parser (2.1.1)
representable (3.1.1)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (3.26.0)
ruby2_keywords (0.0.5)
ruby_dep (1.5.0)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sentry-raven (3.1.2)
faraday (>= 1.0)
sidekiq (5.2.9)
connection_pool (~> 2.2, >= 2.2.2)
rack (~> 2.0)
rack-protection (>= 1.5.0)
redis (>= 3.3.5, < 4.2)
signet (0.15.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
trailblazer-option (0.1.1)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
watir (6.19.1)
regexp_parser (>= 1.2, < 3)
selenium-webdriver (>= 3.142.7)
watir-webdriver (0.9.9)
selenium-webdriver (>= 2.46.2)
watir-webdriver-performance (0.2.4)
watir-webdriver
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webdrivers (4.6.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webrick (1.7.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
annotate (~> 2.7, >= 2.7.5)
bootsnap (>= 1.1.0)
bootstrap (~> 4.3, >= 4.3.1)
byebug
capistrano (~> 3.11)
capistrano-decompose!
capybara (>= 2.15)
chronic (~> 0.10.2)
dotenv-rails
enumerize (~> 2.3, >= 2.3.1)
google-cloud-bigquery
highline (~> 2.0, >= 2.0.2)
httparty (~> 0.17.0)
jbuilder (~> 2.5)
jquery-rails (~> 4.3, >= 4.3.3)
kaminari (~> 1.1, >= 1.1.1)
listen (>= 3.0.5, < 3.2)
net-ssh (~> 5.2)
omniauth (~> 1.9)
omniauth-google-oauth2
pg (>= 0.18, < 2.0)
pipedrive.rb!
pry
puma (~> 3.11)
rails (~> 5.2.3)
rails-settings-cached (~> 2.0, >= 2.0.3)
rouge (~> 3.7)
sass-rails (~> 5.0)
selenium-webdriver
sentry-raven
sidekiq (~> 5.2, >= 5.2.7)
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
uglifier (>= 1.3.0)
watir (~> 6.16, >= 6.16.5)
watir-webdriver-performance
web-console (>= 3.3.0)
webdrivers (~> 4.0)
RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH
2.2.24
...
[1]: https://bundler.io/doc/troubleshooting.html
[2]: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
[3]: https://github.com/rbenv/rbenv/issues/1138
I have a Rails import job that run as a cron job setup through the whenever gem. It was running correctly until I recently updated the app. Now we are seeing the following Error in the logs when the cron job tries to run. If I run the task manually it runs the import correctly.
/usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:91:in `block in materialize': Could not find rake-13.0.1 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `map!'
from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `materialize'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:170:in `specs'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:237:in `specs_for'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:226:in `requested_specs'
from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:108:in `block in definition_method'
from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:20:in `setup'
from /usr/local/lib/ruby/2.6.0/bundler.rb:107:in `setup'
from /usr/local/lib/ruby/2.6.0/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:33:in `<module:Spring>'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/server.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/server.rb:9:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
from /usr/local/bundle/gems/spring-2.1.0/bin/spring:49:in `<main>'
/usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' () required by `$BUNDLER_VERSION`. (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:`
Checked in 'GEM_PATH=/home/sotldirectory', execute `gem env` for more information
from /usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:323:in `to_spec'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:42:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:33:in `<module:Spring>'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/server.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/server.rb:9:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
from /usr/local/bundle/gems/spring-2.1.0/bin/spring:49:in `<main>'
I am seeing two rake versions inside the docker container
*** LOCAL GEMS ***
rake (13.0.1, 12.3.2)
The output from running bundle env
## Environment
Bundler 1.17.2
Platforms ruby, x86_64-linux
Ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
Full Path /usr/local/bin/ruby
Config Dir /usr/local/etc
RubyGems 3.0.3
Gem Home /usr/local/bundle
Gem Path /root/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/bundle
User Path /root/.gem/ruby/2.6.0
Bin Dir /usr/local/bundle/bin
Tools
Git 2.20.1
RVM not installed
rbenv not installed
chruby not installed
Bundler Build Metadata
Built At 2018-12-19
Git SHA 3fc4de72b
Released Version false
Bundler settings
retry
Set for your local app (/usr/local/bundle/config): 3
jobs
Set for your local app (/usr/local/bundle/config): 4
app_config
Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
silence_root_warning
Set via BUNDLE_SILENCE_ROOT_WARNING: true
### Gemfile
ruby
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Rails Specific
# =====================================================================================
# Rails, MySQL, Puma
gem 'rails', '~> 5.2.0'
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
gem 'puma', '~> 4.3'
# Rails Dependencies
gem 'sassc-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
# loads rails apps faster
gem 'bootsnap', '>= 1.1.0', require: false
# Application Specific
# =====================================================================================
# validators
gem 'validate_url'
# security
gem 'sanitize'
# interface items
gem 'carrierwave', '~> 1.2', '>= 1.2.3'
gem 'mini_magick'
gem 'multi-select-rails'
# cas client
gem 'rack-cas', '~> 0.16.0'
# managing cron jobs
gem 'whenever', require: false
# frontend
gem 'normalize-scss'
gem 'font-awesome-sass'
gem "non-stupid-digest-assets" # generates assets without fingerprint for 404 and 500 errors.
# searching / indexing for speeds / pagination for elegance
# gem 'kaminari'
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
# Test Suite
# =====================================================================================
group :test do
gem 'rspec-rails'
gem 'shoulda'
gem 'shoulda-matchers'
gem 'database_cleaner'
gem 'simplecov', '~> 0.10', '< 0.18'
gem 'simplecov-console'
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver', '~> 3.14'
gem 'elasticsearch-extensions'
gem 'executables'
gem 'rspec_junit_formatter'
end
# Development / Test Items (Primarily debugging)
# =====================================================================================
group :development, :test do
gem 'faker'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] # from rails new
gem 'pry'
gem 'pry-rails'
gem 'factory_bot_rails'
gem 'webmock'
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# performance helper
gem 'bullet' # helps to eliminate N+1 Queries
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
### Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.1)
actionpack (= 5.2.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.1)
actionview (= 5.2.4.1)
activesupport (= 5.2.4.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.1)
activesupport (= 5.2.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.1)
activesupport (= 5.2.4.1)
globalid (>= 0.3.6)
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
arel (>= 9.0)
activestorage (5.2.4.1)
actionpack (= 5.2.4.1)
activerecord (= 5.2.4.1)
marcel (~> 0.3.1)
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
arel (9.0.0)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
builder (3.2.4)
bullet (6.1.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.1)
capybara (3.31.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
carrierwave (1.3.1)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
childprocess (3.0.0)
chronic (0.10.2)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.6)
database_cleaner (1.8.3)
diff-lcs (1.3)
docile (1.3.2)
elasticsearch (7.5.0)
elasticsearch-api (= 7.5.0)
elasticsearch-transport (= 7.5.0)
elasticsearch-api (7.5.0)
multi_json
elasticsearch-extensions (0.0.31)
ansi
elasticsearch
elasticsearch-model (7.0.0)
activesupport (> 3)
elasticsearch (> 1)
hashie
elasticsearch-rails (7.0.0)
elasticsearch-transport (7.5.0)
faraday (>= 0.14, < 1)
multi_json
erubi (1.9.0)
execjs (2.7.0)
executables (0.1.0)
factory_bot (5.1.1)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faker (2.10.2)
i18n (>= 1.6, < 2)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
ffi (1.12.2)
font-awesome-sass (5.12.0)
sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.1)
hashie (4.1.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
json (2.3.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.4)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
msgpack (1.3.3)
multi-select-rails (0.9.12)
railties (>= 3.0)
multi_json (1.14.1)
multipart-post (2.1.1)
mysql2 (0.5.3)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
non-stupid-digest-assets (1.0.9)
sprockets (>= 2.0)
normalize-scss (7.0.1)
sass (~> 3.3)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.3)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack-cas (0.16.1)
addressable (~> 2.3)
nokogiri (~> 1.5)
rack (>= 1.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.1)
actioncable (= 5.2.4.1)
actionmailer (= 5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
activemodel (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (= 5.2.4.1)
activesupport (= 5.2.4.1)
bundler (>= 1.3.0)
railties (= 5.2.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.1)
actionpack (= 5.2.4.1)
activesupport (= 5.2.4.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
ruby_dep (1.5.0)
rubyzip (2.2.0)
safe_yaml (1.0.5)
sanitize (5.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.2.1)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shoulda (2.11.3)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-console (0.7.2)
ansi
simplecov
terminal-table
simplecov-html (0.10.2)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.1)
uniform_notifier (1.13.0)
validate_url (1.0.8)
activemodel (>= 3.0.0)
public_suffix
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webmock (3.8.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
whenever (1.0.0)
chronic (>= 0.6.3)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
bootsnap (>= 1.1.0)
bullet
byebug
capybara (>= 2.15, < 4.0)
carrierwave (~> 1.2, >= 1.2.3)
coffee-rails (~> 4.2)
database_cleaner
elasticsearch-extensions
elasticsearch-model
elasticsearch-rails
executables
factory_bot_rails
faker
font-awesome-sass
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
mini_magick
multi-select-rails
mysql2 (>= 0.4.4, < 0.6.0)
non-stupid-digest-assets
normalize-scss
pry
pry-rails
puma (~> 4.3)
rack-cas (~> 0.16.0)
rails (~> 5.2.0)
rspec-rails
rspec_junit_formatter
sanitize
sassc-rails
selenium-webdriver (~> 3.14)
shoulda
shoulda-matchers
simplecov (~> 0.10, < 0.18)
simplecov-console
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
validate_url
web-console (>= 3.3.0)
webmock
whenever
RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH
1.17.2
Docker File
FROM ruby:2.6
# Install capybara-webkit deps
RUN apt-get update \
&& apt-get install -y xvfb git cron qt5-default libqt5webkit5-dev \
gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
imagemagick
# Use JEMALLOC instead
RUN apt-get install -y libjemalloc2 libjemalloc-dev
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so
# Node.js
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -\
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y yarn
# Install our dependencies and rails
RUN mkdir -p /home/sotldirectory
WORKDIR /home/sotldirectory
ADD . /home/sotldirectory
RUN bundle install --jobs=4 --retry=3
# Copy openssl config to correct folder
RUN cp -R openssl.cnf /etc/ssl
ADD ./startup.sh /usr/bin/
RUN chmod -v +x /usr/bin/startup.sh
ENTRYPOINT ["/usr/bin/startup.sh"]
startup.sh
#!/bin/bash
# set terminal
export TERM=vt100
# start cron and update whenever
service cron start
whenever --update-crontab
# remove PID and start the server
file="./tmp/pids/server.pid"
[ -f $file ] && rm $file
bin/rails s -p 3000 -b '0.0.0.0'
schedule.rb - relavant section
# change to the base directory of the application
# run the file with the rails runner task
every 1.minutes do
command 'cd /home/sotldirectory && bin/rails r import/cron_import.rb'
end
I solved a similar issue invoking ./bin/bundle exec before rails, ruby or rake, I think bundler is lost in different ruby versions gems
Change
command 'cd /home/sotldirectory && bin/rails r import/cron_import.rb'
to
command 'cd /home/sotldirectory && bundle exec rails r import/cron_import.rb'
Also, which rake version is listed in your Gemfile.lock?
Changed the dockerfile from FROM ruby:2.6 to FROM ruby:2.6.0. Using ruby:2.6 appears to be pulling 2.6.5. I deleted the gemfile.lock and and a bundle install to reset the gemfile.lock. Currently it is showing one version of bundler 1.17.2 and everything is working normally again. For anyone else that sees this I believe their is issues with bundler 2 and rubygems.
Similar issue seen here
https://github.com/rubygems/bundler/issues/6882
Restart your system and it should work
I want to run a small test Sinatra application. Here is the error message:
Could not find rack-1.5.2 in any of the sources (Bundler::GemNotFound)
I have verified that the rack 1.5.2 gem is installed in my environment.
Here is the Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
rack (1.5.2)
sass (3.1.20)
sequel (4.10.0)
sinatra (1.0)
rack (>= 1.0)
slim (2.0.2)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
sqlite3 (1.3.6)
temple (0.6.7)
tilt (2.0.1)
PLATFORMS
ruby
DEPENDENCIES
rack
sass (= 3.1.20)
sequel
sinatra
slim (= 2.0.2)
sqlite3 (= 1.3.6)
I would appreciate any help on how to proceed.
This may have been asked somewhere else but I either couldn't find it or the solution didn't help me.
I successfully installed Homebrew, RVM, Ruby on Rails and mongoDB.
I followed these instructions http://mongoid.org/en/mongoid/docs/installation.html when installing mongoid but when I ran
rails g mongoid:config it said it could not find the generator.
So I ran rails g and it wasn't in the list. I checked my gem.lock file and it wasn't in there either. I manually put it in there but still no results.
When I ran bundle install on the project it wasn't there either. I tried installing it in my main directory and in the project directory to no avail.
Any direction would be greatly appreciated as I am new to this.
EDIT: My gem.lock file:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.11)
actionpack (= 3.2.11)
mail (~> 2.4.4)
actionpack (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
activerecord (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
activesupport (3.2.11)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.6)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.5.0)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.11)
actionmailer (= 3.2.11)
actionpack (= 3.2.11)
activerecord (= 3.2.11)
activeresource (= 3.2.11)
activesupport (= 3.2.11)
bundler (~> 1.0)
railties (= 3.2.11)
railties (3.2.11)
actionpack (= 3.2.11)
activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdoc (3.12)
json (~> 1.4)
sass (3.2.5)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.2.1)
jquery-rails
rails (= 3.2.11)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
EDIT: Sorry here's my GEmfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
As per instructions, add
gem "mongoid", "~> 3.0.0"
to your Gemfile to use Mongoid 3, and then
bundle install
Make sure that bundle install succeeds, check Gemfile.lock for mongoid, then
rails g mongoid:config