0

I am trying to install Beef in a WIndows 10 - 64 bit PC. I followed the instructions provided in the following link:

https://github.com/beefproject/beef/blob/master/INSTALL.txt

But I keep getting this error:

An error occurred while installing therubyracer (0.11.4), and Bundler cannot continue. Make sure that gem install therubyracer -v '0.11.3' succeeds before bundling.

I drilled down a bit & found that the installed version of therubyracer is 0.11.0beta1 x86-mingw32 whereas the installer is searching for version 0.11.3

In the link provided above, the following lines are mentioned in line 38:

Finally, edit beef's gem lock file by replacing the required ruby racer version with the version downloaded from the link above.

But when I do that I get this error:

Your lockfile is unreadable. Run rm Gemfile.lock and then bundle install to generate a new lockfile.

Can anyone please help me out with this?

Neel
  • 459
  • 6
  • 18

2 Answers2

0

Doing what the error message suggests should do the trick. Just remove existing Gemfile.lock in beef project and then run bundle install command once again.

The Gemfile has the the following check:

# Windows support
if RUBY_PLATFORM.downcase.include?('mswin') || RUBY_PLATFORM.downcase.include?('mingw')
  # make sure you install this gem following https://github.com/eakmotion/therubyracer_for_windows
  gem 'therubyracer', '~> 0.11.0beta1'
elsif !RUBY_PLATFORM.downcase.include?('darwin')
  gem 'therubyracer', '0.11.3'
end

So, it will generate a new Gemfile.lock file specific to Windows. The one in the repo is for Ubuntu/Debian.

Uzbekjon
  • 11,655
  • 3
  • 37
  • 54
  • I tried as you said. But again am getting the same error. But this time its asking for version 0.11.4. Do not know how it is getting resolved to this version in-spite of the declaration in Gemfile. I am really new to Ruby. Please let me know if I am missing something. – Neel May 21 '16 at 14:50
0

Even after trying out the solution given by Uzbekjon, I wasn't able to get past the error. Beef requires a javascript runtime for the login page to properly show up. As suggested in the post given here, I got a workaround by installing Node.js

Community
  • 1
  • 1
Neel
  • 459
  • 6
  • 18