building a vagrant box from scratch - unable to install jekyll

51 views
Skip to first unread message

paul kendal

unread,
Jan 3, 2017, 4:02:00 AM1/3/17
to Vagrant
i am trying to build a vagrant box from scatch -

this are the steps i am meant to follow: 


$ mkdir first-box-factory
$ cd first-box-factory
Initialize a new project using Vagrant:

$ vagrant init -m ubuntu/trusty32
Bring up the VM:

$ vagrant up
www

$ vagrant ssh

$ sudo apt-get update -y
$ sudo apt-get install nodejs -y
$ sudo apt-get install lynx-cur -y
$ sudo apt-get install ruby1.9.1-dev -y
$ sudo gem install jekyll


i have done everything up to the last stage. i need to install jekyll. however, i keep getting this error message: 


Fetching: rb-fsevent-0.9.8.gem (100%)
Fetching: ffi-1.9.14.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such   file -- mkmf (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from extconf.rb:4:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.14 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.14/ext/ffi_c/gem_make.out


i would really appropriate some advice on how i can get around this.




Alvaro Miranda Aguilera

unread,
Jan 3, 2017, 10:50:14 AM1/3/17
to vagra...@googlegroups.com

On Tue, Jan 3, 2017 at 10:01 AM, 'paul kendal' via Vagrant <vagra...@googlegroups.com> wrote:
cannot load such   file -- mkmf (LoadError)

hi

Seems to be related to  cannot load such   file -- mkmf (LoadError)

what happens if you use  ruby and ruby-dev 

?



--
Alvaro

paul kendal

unread,
Jan 3, 2017, 2:06:25 PM1/3/17
to Vagrant
hi. thanks for your response. i am not clear what you mean by using ruby-dev. do you mean, i should try without the numbering?

Alvaro Miranda Aguilera

unread,
Jan 3, 2017, 2:08:20 PM1/3/17
to vagra...@googlegroups.com
hello

replace:
$ sudo apt-get install ruby1.9.1-dev -y
$ sudo gem install jekyll

with

$ sudo apt-get install ruby ruby-dev builc-essentials -y
$ sudo gem install jekyll

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/e6850c44-281a-4e53-897a-10aca6e11000%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

paul kendal

unread,
Jan 4, 2017, 2:57:02 AM1/4/17
to Vagrant
hello Alvaro

i tried what you suggested but got this message: 

Building dependency tree
Reading state information... Done
E: Unable to locate package builc-essentials


is there anything you can suggest?
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 4, 2017, 8:19:58 AM1/4/17
to vagra...@googlegroups.com
hello.

my bad for the typo


$ sudo apt-get install ruby ruby-dev build-essential -y
$ sudo gem install jekyll

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4ac6f12c-4fa2-4b5b-aef9-9b986f37c738%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

paul kendal

unread,
Jan 5, 2017, 2:46:53 AM1/5/17
to Vagrant
Hi Alvaro

sorry to come back to you on this, but it's still not working. the package now installs ruby1.9.3.4, however jekyll requires  2.0

these are these are the messages i received: 

$ sudo apt-get install ruby ruby-dev build-essential -y


Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up libfile-fcntllock-perl (0.14-2build1) ...
Setting up ruby1.9.1-dev (1.9.3.484-2ubuntu1.2) ...
Setting up ruby-dev (1:1.9.3.4) ...



sudo gem install jekyll


ERROR:  Error installing jekyll:
        public_suffix requires Ruby version >= 2.0.

any advice on what i should do?



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 5, 2017, 10:29:36 AM1/5/17
to vagra...@googlegroups.com
Hello,

Couple of options, one is to use a newer OS and check if the ruby you require is there.

Ubuntu Xenial should do fine.

OR, learn a bit of ruby and use either rbenv or rvm.

At the end you will end with a set of scripts/instructions that vagrant can run on your behalf.

Maybe check Jekyll blogs, or try to find some project of someone that is using Vagrant already.

Happy to help with Vagrant questions.

Alvaro.

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b97ba6bb-7ca4-4645-9b6c-d2caf57ccb25%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages