I am using Mac and I want to run Ruby On Rails project on docker.
My setup is:
Dockerfile:
FROM ruby:2.7.2
RUN apt-get update -qq && apt-get install -y build-essential
RUN apt-get install -y libv8-dev
RUN apt-get install -y libpq-dev
RUN apt-get install -y libxslt-dev liblzma-dev patch git-core zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
RUN gem install bundler
RUN gem install nokogiri --platform=ruby
RUN gem install libv8 -v '3.16.14.19' --source 'https://rubygems.org/'
ENV APP_HOME /myapp
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile /myapp/Gemfile
COPY Gemfile.lock /myapp/Gemfile.lock
RUN bundle install --no-deployment
ADD . $APP_HOME
docker-compose.yml:
version: '3'
services:
db:
image: postgres
ports:
- "5440:5432"
environment:
POSTGRES_PASSWORD: password
volumes:
- ./tmp/db:/var/lib/postgresql/data
web:
build: .
command: bin/rails server --port 3000 --binding 0.0.0.0
volumes:
- .:/myapp
ports:
- "3007:3000"
links:
- db
Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.2'
gem 'rails', '~> 6.1.3'
gem 'pg', '~> 1.1'
gem 'puma', '~> 5.0'
gem 'therubyracer', platforms: :ruby
gem 'sass-rails', '>= 6'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.7'
gem 'bootsnap', '>= 1.4.4', require: false
gem 'dotenv-rails'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "excon", "~> 0.79.0"
gem "activeadmin"
gem "devise"
gem "cancancan"
gem "haml-rails", "~> 2.0"
gem 'simple_token_authentication', '~> 1.0' # see semver.org
gem 'sidekiq'
gem 'sidekiq-client-cli'
gem 'whenever'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'pry-byebug'
gem 'pry-doc'
gem 'pry-rails'
end
group :development do
gem 'web-console', '>= 4.1.0'
gem 'rack-mini-profiler', '~> 2.0'
gem 'listen', '~> 3.3'
gem 'spring'
gem 'capistrano', require: false
gem 'capistrano-rvm', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-bundler', require: false
gem 'capistrano3-puma', require: false
end
group :test do
gem 'capybara', '>= 3.26'
gem 'selenium-webdriver'
gem 'webdrivers'
end
I try run docker build ., but I always receive errors
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/libv8-3.16.14.19/ext/libv8
/usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r
./siteconf20210323-5-xzbchb.rb extconf.rb
creating Makefile
Applying
/usr/local/bundle/gems/libv8-3.16.14.19/patches/disable-building-tests.patch
Applying
/usr/local/bundle/gems/libv8-3.16.14.19/patches/disable-werror-on-osx.patch
Applying
/usr/local/bundle/gems/libv8-3.16.14.19/patches/disable-xcode-debugging.patch
Applying
/usr/local/bundle/gems/libv8-3.16.14.19/patches/do-not-imply-vfp3-and-armv7.patch
Applying
/usr/local/bundle/gems/libv8-3.16.14.19/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch
Applying /usr/local/bundle/gems/libv8-3.16.14.19/patches/do-not-use-vfp2.patch
Applying /usr/local/bundle/gems/libv8-3.16.14.19/patches/fPIC-for-static.patch
Compiling v8 for x64
Using python 2.7.16
Using compiler: c++ (GCC version 8.3.0)
Beginning compilation. This will take some time.
Building v8 with env CXX=c++ LINK=c++ /usr/bin/make x64.release
ARFLAGS.target=crs werror=no
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=x64 \
-S.x64 -Dv8_enable_backtrace=1
-Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2
-Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
make[1]: Entering directory
Gem files will remain installed in /usr/local/bundle/gems/libv8-3.16.14.19 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/2.7.0/libv8-3.16.14.19/gem_make.out
An error occurred while installing libv8 (3.16.14.19), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.19' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
therubyracer was resolved to 0.12.3, which depends on
libv8
So please help me.
Related
Want to achieve
Thank you for browsing.
I got the following error when using "bundle install" to build with CircleCI.
In my environment, I can install the bundle without any problems.
I hope you can tell me how to solve this problem.
error
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/home/circleci/myapp/web/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0-static/mysql2-0.5.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/home/circleci/myapp/web/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.2 for
inspection.
Results logged to
/home/circleci/myapp/web/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0-static/mysql2-0.5.2/gem_make.out
An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
mysql2
Exited with code exit status 5
CircleCI received exit code 5
Codes
.circleci/config.yml
version: 2.1
orbs:
ruby: circleci/ruby#1.1.2
jobs:
build:
docker:
- image: cimg/ruby:2.6.5
working_directory: ~/myapp/web
steps:
- checkout:
path: ~/myapp
- ruby/install-deps
workflows:
version: 2
build_and_test:
jobs:
- build
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.7'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.4.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# jQuery
gem "jquery-rails"
gem 'rails-i18n', '~> 6'
gem "enum_help"
gem "config"
gem 'faraday'
gem 'acts_as_paranoid', '~> 0.6.0'
gem 'http-cookie'
gem 'kaminari'
gem 'devise'
gem 'devise_token_auth'
gem 'devise-security'
gem 'devise-two-factor', '~> 3.1'
# AWS
gem 'aws-sdk'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
gem 'composite_primary_keys'
# Antivirus
gem 'clamav-client', require: 'clamav/client'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I tried
Mention to run gem install mysql2 -v before ruby/install-deps
- run:
name: Install mysql2
command: gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/'
- ruby/install-deps
↓
build
↓
Another error occurred.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/circleci/.rubygems/extensions/x86_64-linux/2.6.0-static/mysql2-0.5.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/circleci/.rubygems/gems/mysql2-0.5.2 for inspection.
Results logged to /home/circleci/.rubygems/extensions/x86_64-linux/2.6.0-static/mysql2-0.5.2/gem_make.out
Exited with code exit status 1
CircleCI received exit code 1
I modified the config.yml as follows and was able to build
steps:
- checkout:
path: ~/myapp
- run:
name: default mysql client install
command: |
sudo apt update
sudo apt-get install default-mysql-client
sudo apt-get install libmysqlclient-dev
- run:
name: bundle Install
command: bundle install --path vendor/bundle
I have been working with the same Dockerfile for months on a rails api and suddenly it will no longer build. I am getting an error everytime it tries to install racc :
#11 7.201 Installing racc 1.6.0 with native extensions
#11 7.598 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
#11 7.598
#11 7.598 current directory: /usr/local/bundle/gems/racc-1.6.0/ext/racc/cparse
#11 7.598 /usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r
#11 7.598 ./siteconf20211027-1-1m7t8pg.rb extconf.rb
#11 7.598 checking for rb_block_call()... *** extconf.rb failed ***
#11 7.598 Could not create Makefile due to some reason, probably lack of necessary
#11 7.598 libraries and/or headers. Check the mkmf.log file for more details. You may
#11 7.598 need configuration options.
It's so strange that it was working fine until this afternoon. Here's my dockerfile:
FROM ruby:2.7.4-alpine
ENV APP_PATH /api
ENV RAILS_PORT 3000
# install dependencies for application these are specific to alpine
RUN apk -U add --no-cache --update \
build-base \
git \
vim \
postgresql-dev \
postgresql-client \
ruby-diff-lcs \
libxml2-dev \
libxslt-dev \
linux-headers \
nodejs \
yarn \
imagemagick \
tzdata \
less \
ruby-nokogiri \
&& rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
# navigate to app directory
WORKDIR $APP_PATH
COPY Gemfile ${APP_PATH}/Gemfile
COPY Gemfile.lock ${APP_PATH}/Gemfile.lock
RUN mkdir -p ${APP_PATH}/log && touch ${APP_PATH}/log/development.log
RUN bundle install
COPY . $APP_PATH
RUN gem install foreman
and my Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.4'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 1.1'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
# Devise and Json Web Token deps
gem 'devise'
gem 'devise-jwt'
gem 'fast_jsonapi'
# QR Code Generator
gem "rqrcode", "~> 2.0"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'faker'
gem 'rspec-rails'
# testing stuff
gem 'factory_bot_rails'
gem 'shoulda-matchers'
gem 'database_cleaner'
end
group :development do
gem 'listen', '~> 3.3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Any help or suggestions appreciated. Thank you!
When I run docker-compose up -d I get the following error:
web_1 | Could not locate Gemfile or .bundle/ directory
However the image is being created. I want to have a Rails application, and for the Docker files to live outside the rails application. I have the following Dockerfile
FROM ruby:2.5
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
WORKDIR /app
COPY ./app/Gemfile Gemfile
# Install Gems
RUN bundle install
ADD . /app
In the docker-compose.yml file I have the Following configuration:
version: '3'
services:
db:
image: postgres:9.6.1 # To Edit - Default is postgresql.
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
And for the Gemfile I have the following code:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I'm not sure if it has something to do with the Rails or Ruby version. I also see that the Gemfile is there once I go into the container and run ls so is not that theres no Gemfile.
root#ab38d643df47:/app# ls
Dockerfile Gemfile Gemfile.lock README.md app docker-compose.yml
try this:
FROM ruby:2.5
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
WORKDIR app
COPY Gemfile Gemfile
# Install Gems
RUN bundle install
ADD . app
I have a Rails application running in docker. I have two images which are connected. I can't run server of one of them and it works fine, but I cannot run another one and none of simple commands doesn't work too. It fails telling me Could not find rake-12.3.1 in any of the sources.
There is already existing solution
None of the solutions from link above doesn't work.
Error looks like this
bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
Here is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 4.2'
gem 'rails-i18n'
gem 'responders', '~> 2.0'
gem 'puma'
gem 'mysql2', '~> 0.3.21'
gem 'redis-rails'
gem 'json'
gem 'jbuilder'
gem 'omniauth', '~> 1.8.1'
gem 'omniauth-auth0', '~> 2.0.0'
gem 'omniauth-google-oauth2', '~> 0.5.2'
gem 'omniauth-barong', '~> 0.1.2'
gem 'figaro'
gem 'hashie', '~> 3.0'
gem 'aasm', '~> 4.12'
gem 'bunny', '~> 2.9.0'
gem 'cancancan'
gem 'enumerize'
gem 'datagrid'
gem 'kaminari'
gem 'paranoid2'
gem 'active_hash'
gem 'http_accept_language'
gem 'paper_trail', '~> 3.0.1'
gem 'rails-observers'
gem 'country_select', '~> 2.1.0'
gem 'gon', '~> 5.2.0'
gem 'pusher'
gem 'eventmachine', '~> 1.0.4'
gem 'em-websocket', '~> 0.5.1'
gem 'simple_form', '~> 3.1.0'
gem 'slim-rails'
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier', '~> 4.1'
gem 'jquery-rails'
gem 'angularjs-rails', '~> 1.3.15'
gem 'bootstrap-sass', '~> 3.2.0.2'
gem 'font-awesome-sass'
gem 'bourbon'
gem 'momentjs-rails'
gem 'eco'
gem 'browser', '~> 0.8.0'
gem 'rbtree'
gem 'liability-proof', '0.0.9'
gem 'grape', '~> 1.0.1'
gem 'grape-entity', '~> 0.5.2'
gem 'grape-swagger', '~> 0.27.3'
gem 'grape-swagger-ui', '~> 2.2.8'
gem 'rack-attack', '~> 4.3.1'
gem 'easy_table'
gem 'faraday', '~> 0.12'
gem 'jwt', '~> 1.5'
gem 'email_validator', '~> 1.6'
gem 'clipboard-rails', '~> 1.7'
gem 'god', '~> 0.13.7', require: false
gem 'mini_racer', '~> 0.1', require: false
gem 'arel-is-blank', '~> 1.0'
gem 'sentry-raven', '~> 2.7', require: false
gem 'memoist', '~> 0.16'
gem 'method-not-implemented', '~> 1.0'
gem 'passgen', '~> 1.0'
gem 'validates_lengths_from_database', '~> 0.7.0'
group :development, :test do
gem 'factory_bot_rails'
gem 'faker', '~> 1.4.3'
gem 'binding_of_caller'
gem 'quiet_assets'
gem 'timecop'
gem 'rspec-rails', '~> 3.7'
gem 'pry-byebug'
end
group :development do
gem 'annotate', '~> 2.7'
end
group :test do
gem 'database_cleaner'
gem 'mocha', require: false
gem 'capybara', '~> 2.17'
gem 'selenium-webdriver', '~> 3.8'
gem 'chromedriver-helper', '~> 1.1'
gem 'rack_session_access', '~> 0.1'
gem 'webmock', '~> 3.3'
end
Here is Dockerfile
FROM ruby:2.5.0
MAINTAINER lbellet#heliostech.fr
ARG RAILS_ENV=production
ENV RAILS_ENV ${RAILS_ENV}
ENV APP_HOME=/home/app
RUN groupadd -r app --gid=1000
RUN useradd -r -m -g app -d /home/app --uid=1000 app
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/source$
&& apt-get update \
&& apt-get install -y \
default-libmysqlclient-dev \
imagemagick \
gsfonts \
chromedriver \
nodejs \
yarn
WORKDIR $APP_HOME
COPY Gemfile Gemfile.lock $APP_HOME/
# Install dependencies
RUN mkdir -p /opt/vendor/bundle && chown -R app:app /opt/vendor
RUN su app -s /bin/bash -c "bundle install --path /opt/vendor/bundle"
# Copy the main application.
COPY . $APP_HOME
RUN chown -R app:app /home/app
USER app
RUN ./bin/init_config \
&& chmod +x ./bin/logger \
&& bundle exec rake tmp:create yarn:install assets:precompile
# Expose port 8080 to the Docker host, so we can access it
# from the outside.
EXPOSE 8080
ENTRYPOINT ["bundle", "exec"]
# The main command to run when the container starts. Also
# tell the Rails dev server to bind to all interfaces by
# default.
CMD ["puma", "--config", "config/puma.rb"]
I tried to reinstall docker, change ruby version, delete Gemfile.lock, but nothing seems to work. How can I resolve that?
Had a similar situation, this worked for me:
bundle install --binstubs
I believe that you need to update your rbenv-bundler from homebrew.
Try:
brew upgrade rbenv-bundler
Then, try installing the gem.
gem install rake -v 12.3.1
I'm trying to install Jruby on ROR for my application. Used commands from its documentation https://devcenter.heroku.com/articles/moving-an-existing-rails-app-to-run-on-jruby . While bundle installation got the following errors
Your Ruby engine is ruby, but your Gemfile specified jruby
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Furthermore certain gems are not installed successfully, shows error like
An error occurred while installing libv8 (3.16.14.3), and Bundler cannot
continue.
Make sure that gem install libv8 -v '3.16.14.3' succeeds before bundling.
Not able to find the issue. Would somebody help with this ?
Gemfile :
ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.9'
gem "rake"
gem "rails", "3.2.16"
gem 'foreigner'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'jruby'
gem 'airbrake'
gem "spreadsheet", "~> 0.9.0"
gem 'paperclip'
gem 'aws'
gem 'aws-sdk'
gem 'aws-s3', :require => nil
gem 'authlogic'
gem 'execjs'
gem 'mail', :require => nil
gem 'fastercsv', :require => nil
gem "rspec-rails"
gem 'rubyzip', :require => nil
gem 'test-unit'
gem 'typhoeus'
gem 'thin'
gem 'therubyracer'
gem 'useragent'
gem 'will_paginate'
gem 'therubyracer'
gem 'libv8', '3.16.14.3'
You can't use 'therubyracer' and 'libv8' gems with JRuby.
Short answer:
Use 'therubyrhino' gem instead (https://github.com/cowboyd/therubyrhino)
Explanation:
There are some gems that can't be used under JRuby, because they are using native (C) extensions - here is a list: https://github.com/jruby/jruby/wiki/C-Extension-Alternatives
Make sure to install all below libraries, before installing Ruby/RVM.
sudo apt-get install zlib1g zlib1g-dev build-essential openssl libssl-dev libmysqlclient18 libmysqlclient-dev libyaml-dev
Before JRuby installation.
sudo apt-get install ruby-dev
sudo apt-get install build-essential g++
rvm install jruby
Don't specify Jruby version, default you will get latest version.