There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
You should run following command to install NodeJS in Ubuntu
sudo apt-get install nodejs
or run this for OSX
brew install nodejs
Uglifier is a JS wrapper and it needs a JS runtime running or JS interpreter. I would choose to install NodeJS.
Rails server won't run - Could not find gem error
try bundle install --path vendor/cache
Ruby-on-rails web application could not be started because of 'uglifier'
This is a known issue with therubyracer and Ruby 2.4. There are a couple of additional issues with Ruby 2.4 compatibility which are tracked in their issue tracker at https://github.com/cowboyd/therubyracer/issues/430.
You should use an earlier version of Ruby, e.g. 2.3.3 until a new version is therubyracer is released.
BTW: There are several gems which are not yet compatible with Ruby 2.4. In order to shield you from experiencing a large amount of compatibility issues after a new release, it is probably wise to not upgrade on first day of release
After Ruby 2.4 upgrade - error while trying to load the gem 'uglifier' (Bundler::GemRequireError)
This is an open issue on the uglifier
repository: Uglifier doesn't load with Ruby 2.4.0 using The Ruby Racer JS runtime.
It was caused by the unification of Fixnum
and Bignum
into Integer
, in Ruby 2.4.0. Here is the pull request that resolves the issue, which actually lies in therubyracer
, not uglifier
.
For now, as a temporary fix, you could configure your Gemfile
to use the master branch of the repo:
gem 'therubyracer', git: 'https://github.com/cowboyd/therubyracer.git'
Update: therubyracer
version 0.12.3
has now been released, which includes the above fix for ruby 2.4 support.
Related Topics
Cannot Install Any Ruby Gems on MAC Os - Ssl_Connect Error
Ruby - Return Byte Array Containing Two's Complement Representation of Bignum/Fixnum
How to Make a Ruby Gem Package Copy Files to Arbitrary Locations
How to Include Unit Tests in a Ruby Module
Rails 3 Caching: Expire Action for Named Route
How to Set Up the Recipient Id in Public Activity
How Do to Print Two Zero's 00 as an Integer
Vagrant Ssh Not Working in Mobaxterm on Windows
Changing Http Status Message Using Sinatra
Setting a Global Within a Proc
How to Build Ruby 2.1.3 on Osx 10.10 Gm 3.0 with Rbenv
Ruby: How to Convert Ip Range to Array of Ip'S
Rails Reload Dynamic Routes on Multiple Instances/Servers
Tinytds Error: Adaptive Server Connection Timed Out
Installing Dm-Types on Windows. (Win7 X64)
Grit's Clone Method Is Undefined
Importing CSV Data into Rails App, Using Something Other Then the Association "Id"