2

I'm using Anvil to manage my local sites. I have several and they all work fine apart from one, my most recent site.

The error i get when i attempt to start it is:

Error starting application
Your Rack app raised an exception when Pow tried to run it.
Bundler::GemNotFound: Could not find execjs-2.2.2 in any of the sources

Here is my Gemfile:

source 'https://rubygems.org'

gem 'rails', '4.1.4'

gem 'sqlite3', group: :development

gem 'sass-rails', '~> 4.0.3'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

# gem 'therubyracer',  platforms: :ruby

gem 'jquery-rails'

gem 'turbolinks'

gem 'jbuilder', '~> 2.0'

gem 'sdoc', '~> 0.4.0',          group: :doc

gem 'spring',        group: :development

gem "twitter-bootstrap-rails"
gem "simple_form"
gem "httparty"
gem 'rails_12factor', group: :production
gem 'pg', group: :production

I've had a look through questions on SO and google but haven't been able to figure it out.

I'm using RVM version 1.25.28

Thanks

Robbo
  • 1,292
  • 2
  • 18
  • 41

1 Answers1

6

This issue seemed to be a result of RVM. I didn't have to do this is any of my other projects but for this one I did the following in order to load RVM into the app's .powrc file:

  1. create .powrc file in root directory

  2. Add this:

    if [ -f "$rvm_path/scripts/rvm" ]; then
       source "$rvm_path/scripts/rvm"
    
      if [ -f ".rvmrc" ]; then
       source ".rvmrc"
      fi
    
      if [ -f ".ruby-version" ]; then
       rvm use `cat .ruby-version`
      fi
    
      if [ -f ".ruby-gemset" ]; then
       rvm gemset use --create `cat .ruby-gemset`
      fi
    fi
    
  3. save

And that's it

Hopefully this may be of use in the future to others

Cheers

Robbo
  • 1,292
  • 2
  • 18
  • 41
  • alternatively, adding this `source "${rvm_path}/scripts/rvm" cd .` to the `.powrc` file works too – Robbo Oct 25 '14 at 10:26