Skip to content

Commit

Permalink
Merge pull request nasa#111 from nasa/CMR-9056
Browse files Browse the repository at this point in the history
CMR-9056: Upgrade to Ruby 3+ and gemfile updates
  • Loading branch information
hgrams-e84 authored Apr 5, 2023
2 parents e16fb4d + cfb419e commit 48a9c10
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
3.1.4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ruby image
FROM ruby:2.7.4
FROM ruby:3.1.4

ENV DEBIAN_FRONTEND noninteractive

Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
File.read('.ruby-version').chomp.split('-')[1] { |f| "ruby '#{f}'"}

gem 'activeresource', '>= 5.1.1'
gem 'ffi', '1.9.24'
gem 'ffi', '1.15.5'
gem 'flipper'
gem 'georuby', '~> 2.5.2'
gem 'jquery-rails', '~> 4.4.0'
Expand All @@ -25,7 +25,7 @@ group :assets do
gem 'execjs', '~> 2.7.0'
gem 'sass-rails', '~> 5.0.7'
gem 'sass', '~> 3.5.5'
gem 'therubyracer', '~> 0.12.3'
gem 'mini_racer'
gem 'uglifier', '~> 4.1.6'
end

Expand Down
16 changes: 7 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ GEM
et-orbi (1.2.7)
tzinfo
execjs (2.7.0)
ffi (1.9.24)
ffi (1.15.5)
flipper (0.25.0)
fugit (1.5.3)
et-orbi (~> 1, >= 1.2.7)
Expand All @@ -167,7 +167,7 @@ GEM
thor (>= 0.14, < 2.0)
json (2.6.2)
kgio (2.11.4)
libv8 (3.16.14.19)
libv8-node (16.10.0.0)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -187,6 +187,8 @@ GEM
rake
mini_mime (1.1.2)
mini_portile2 (2.8.1)
mini_racer (0.6.3)
libv8-node (~> 16.10.0.0)
minitest (5.18.0)
multi_test (0.1.2)
net-imap (0.3.4)
Expand Down Expand Up @@ -259,7 +261,6 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.7.1)
ref (2.0.0)
regexp_parser (2.5.0)
responders (3.1.0)
actionpack (>= 5.2)
Expand Down Expand Up @@ -334,9 +335,6 @@ GEM
sprockets (>= 3.0.0)
sys-uname (1.2.2)
ffi (~> 1.1)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (1.2.1)
tilt (2.0.11)
timeout (0.3.2)
Expand Down Expand Up @@ -376,12 +374,13 @@ DEPENDENCIES
coffee-rails (~> 4.2.2)
cucumber-rails
execjs (~> 2.7.0)
ffi (= 1.9.24)
ffi (= 1.15.5)
flipper
georuby (~> 2.5.2)
jquery-rails (~> 4.4.0)
loofah (>= 2.3.1)
mimemagic (~> 0.3.7)
mini_racer
nokogiri (>= 1.13.9)
pry-rails
rack (~> 2.0)
Expand All @@ -401,11 +400,10 @@ DEPENDENCIES
sass (~> 3.5.5)
sass-rails (~> 5.0.7)
simplecov
therubyracer (~> 0.12.3)
uglifier (~> 4.1.6)
unicorn
vcr
webmock

BUNDLED WITH
2.1.4
2.4.10
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ See public/licenses.txt

## Installation

* Ruby 2.7.4
* Ruby 3.1.4
* A Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/rbenv/rbenv) is strongly recommended.

### Initial setup
Once the repository is cloned locally and Ruby 2.5.3 is installed, you must install the dependencies.
Once the repository is cloned locally and Ruby 3.1.4 is installed, you must install the dependencies.
If you don't have the [bundler](https://bundler.io/) gem already installed, execute the command below in the project root directory:

gem install bundler
Expand All @@ -50,14 +50,13 @@ Install all the gem dependencies:
bundle install

In some cases, depending on your operating system type and/or version, the above command will fail while trying to install
the libv8 and therubyracer gems. While there might be lots of causes for the errors and lots of
the libv8 gem. While there might be lots of causes for the errors and lots of
solutions to fix the errors, we found that on some versions of OS X, you can overcome the problem by trying to use the existing
operating system version of the libv8 library, rather than trying to build a new one during the normal gem install.
We found the following workarounds to the _**bundle install**_ failures due to libv8:

$ brew install [email protected]
$ bundle config build.libv8 --with-system-v8
$ bundle config build.therubyracer --with-v8-dir=$(brew --prefix [email protected])
$ bundle install

Local problems with mimemagic on MACOSX?
Expand Down Expand Up @@ -147,11 +146,9 @@ that the application needs in order to run. A sample _config/application.yml_ f

development:
<<: *current
CMR_ECHO_SYSTEM_TOKEN: "CMR system token with tagging permissions in the CMR environment that development uses"

production:
<<: *current
CMR_ECHO_SYSTEM_TOKEN: "CMR system token with tagging permissions in the CMR PROD environment"

test: &test
# test values are already defaulted to enable CI automated Rspec and cucumber tests
Expand Down

0 comments on commit 48a9c10

Please sign in to comment.