1

I'm trying to install Ruby, I followed the installation guide well, but when I tried to run the server by the command: ruby bin/rails setup after I created the controller called blog as described in the instructions, it gave me an error in red and a text in yellow: Error: Could not find gem uglifier <>= 1.3.0 in the gems available on the machine.

Yes! I know that this is a Googleable question but all I can get are solutions for people with internet access on their PC.

But unfortunately, my computer doesn't have a working Internet connection. I'm posting this question from my phone. So I'm unable to install uglifier(if that's the required thing to do) through the command prompt. Many thanks.

mzcoxfde
  • 235
  • 2
  • 13
  • can you try bundle exec rails – sethi Jun 19 '16 at 12:52
  • 2
    You can't install it without internet connection. If you still want to install it, then install it on some other device and transfer it to this PC with USB. – Awais Shafqat Jun 19 '16 at 13:24
  • @AwaisShafqat Can you show us your source which says that or a little explanation at least? – Slim Shady Jun 19 '16 at 13:39
  • mzcoxfde you should download the gem file (file with ".gem") some way(mobile phone maybe ?) and then copy it to the computer, you can find how to install a gem from a file [here](http://stackoverflow.com/questions/220176/how-can-i-install-a-local-gem) – niceman Jun 19 '16 at 14:35
  • I have to say though you might struggle with gems latter because of "oh I didn't know I should download that" So getting internet or telling some friend to do it is better – niceman Jun 19 '16 at 14:36
  • @BenJunior you want source for this?? installation of gem without internet? – Awais Shafqat Jun 19 '16 at 14:40
  • .... the simplest answer (by a longshot) is going to be "get your internet connection working". There are ways to dance around that, but they're all going to have headaches involved. – Some Guy Jun 19 '16 at 18:46

1 Answers1

0

Please could you check if your Gemfile has the following gem

gem 'uglifier'

If the Gem is not present add it to your Gemfile, if you already have it in your Gemfile please run:

bundle install

After that you should check if the bundler is installing the uglifier gem.

Hope that helps,

Snoobie
  • 760
  • 2
  • 12
  • 30