# Installing locally through vagrant

**URL:** https://meta.discourse.org/t/installing-locally-through-vagrant/50874
**Category:** Self-hosting
**Created:** [9월 29, 2016, 6:04오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874 "2016-09-29T18:04:41Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [9월 29, 2016, 6:04오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/1 "2016-09-29T18:04:41Z")

</div>

I get this error, when running the rake command in my vagrant machine. I followed the tutorial here:  
[https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md](https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md)

I am using Mac OS X El Capitan.

Here is the error:

vagrant@discourse:/vagrant$ bundle exec rake db:migrate  
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.  
Please register a mime type using `register_mime_type` then  
use `register_compressor` or `register_transformer`.

> <https://github.com/rails/sprockets/blob/main/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors>

(called from \<top (required)\> at /vagrant/lib/es6\_module\_transpiler/sprockets.rb:3)  
rake aborted!  
Errno::ENOENT: No such file or directory @ rb\_sysopen - /home/vagrant/.rvm/gems/ruby-2.3.1/gems/ember-data-source-2.3.0.beta.5/dist/ember-data.js

I thought vagrant was supposed to make this painless?

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 7:40오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/2 "2016-10-05T19:40:17Z")

</div>

very nice, no answer 🙂

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 7:41오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/3 "2016-10-05T19:41:10Z")

</div>

anyhow, i am getting badges like crazy, so i got that going for me

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [10월 5, 2016, 7:48오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/4 "2016-10-05T19:48:24Z")

</div>

> [@Mihai\_Raulea](#):
>
> I am using Mac OS X El Capitan.

> ### If you are on a Mac or PC, please try our [Discourse as Your First Rails App](http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/) blog post first!

Did you try that first and have no luck with it?

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 8:01오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/5 "2016-10-05T20:01:06Z")

</div>

hello, thanks for your answer! this is exactly where the error occurs; inside the vagrant env. i am not a newbie, but i am no ruby dev. the production(a VPS with Ubuntu) offers the same exquisite error.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [10월 5, 2016, 8:03오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/6 "2016-10-05T20:03:00Z")

</div>

By chance did you run bundle install?

I know @tarek did some work on the vagrant image a short while ago, so you may want to check out this topic (ignore anything at the OS level but anything after `vagrant ssh` is fair game)

> [@(Superseded) Set up a development environment using Vagrant on Ubuntud](https://meta.discourse.org/t/howto-set-up-a-development-environment-using-vagrant-ubuntu-guide/45277):
>
> information_source This doc is no longer maintained and using Docker for development is recommended instead of using Vagrant. See: [Install Discourse for development using Docker](https://meta.discourse.org/t/beginners-guide-to-install-discourse-for-development-using-docker/102009) After having setup several systems with a discourse development environment using Vagrant, I thought I would write a quick guide here, which I really should submit as a README. This setup was tested on a virgin installation of 18.04, and uses Eclipse with Aptana Studio 3. Install requirements sudo apt install vag…

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [10월 5, 2016, 8:05오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/7 "2016-10-05T20:05:48Z")

</div>

Hmmm. re the Deprecated, this file was last commited 2 years ago

[https://github.com/discourse/discourse/blob/master/lib/es6\_module\_transpiler/sprockets.rb](https://github.com/discourse/discourse/blob/master/lib/es6_module_transpiler/sprockets.rb)

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 8:39오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/8 "2016-10-05T20:39:45Z")

</div>

yes, i did. thank you for the resource, i will look into it.

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 8:40오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/9 "2016-10-05T20:40:08Z")

</div>

yes, maybe there is some compatibility issue with that?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [10월 5, 2016, 8:41오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/10 "2016-10-05T20:41:20Z")

</div>

Hopefully sometime towards this weekend, I’ll be able to find time to try a fresh vagrant setup. I know I won’t have time today, but I’ll try to see if I can work something in later in this week (granted, I don’t own a Mac, so it will be a slightly different experience, but if your issues are truly within Vagrant itself, it shouldn’t matter). 🙂

---

<div class="post-metadata">

### Author: ![Mihai\_Raulea](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihai_raulea/32/62183_2.png) [@Mihai\_Raulea](https://meta.discourse.org/u/Mihai_Raulea)
#### Post date: [10월 5, 2016, 8:43오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/11 "2016-10-05T20:43:12Z")

</div>

thank you. yes, assuming VirtualBox does the job it is supposed to do. and i am guessing so. let me know if i can assist with anything.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [10월 6, 2016, 1:47오전 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/12 "2016-10-06T01:47:42Z")

</div>

So my sound rehearsal ended early tonight and I got a chance to destroy my current vagrant image and up it again… and it works. I don’t get any errors about sprockets ☹

Can you run the following after `vagrant ssh`?

```plaintext
cd /vagrant
bundle check
bundle show sprockets

```

Here are my results, for comparison:

```plaintext
vagrant@discourse:/vagrant$ bundle check
The Gemfile's dependencies are satisfied
vagrant@discourse:/vagrant$ bundle show sprockets
/home/vagrant/.rvm/gems/ruby-2.3.1/gems/sprockets-3.6.3

```

---

<div class="post-metadata">

### Author: ![shisongsong](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shisongsong](https://meta.discourse.org/u/shisongsong)
#### Post date: [10월 10, 2016, 4:41오전 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/13 "2016-10-10T04:41:21Z")

</div>

Hi, I got the same error, and have no idea now, how about you

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [10월 10, 2016, 4:51오전 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/14 "2016-10-10T04:51:28Z")

</div>

Can you provide the output for bundle check and bundle show sprockets? I’d like to see if those got installed properly on your vagrant instance.

---

<div class="post-metadata">

### Author: ![shisongsong](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shisongsong](https://meta.discourse.org/u/shisongsong)
#### Post date: [10월 10, 2016, 5:11오전 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/16 "2016-10-10T05:11:14Z")

</div>

I am sorry about the format, cause I can’t post more than 2 links

---

<div class="post-metadata">

### Author: ![shisongsong](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shisongsong](https://meta.discourse.org/u/shisongsong)
#### Post date: [10월 10, 2016, 5:19오전 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/17 "2016-10-10T05:19:56Z")

</div>

```
here it is:
songsong@Gialib001deMini:~/Workspace/github/discourse|master⚡ 
⇒ rake db:migrate
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
 https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
 (called from <top (required)> at /Users/songsong/Workspace/github/discourse/lib/es6_module_transpiler/sprockets.rb:3)
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/songsong/.rvm/gems/ruby-2.3.0/gems/ember-data-source-2.3.0.beta.5/dist/ember-data.js
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/ember-rails-0.18.5/lib/ember_rails.rb:68:in `block in <class:Railtie>'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/songsong/Workspace/github/discourse/config/environment.rb:5:in `<top (required)>'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:328:in `require_environment!'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/Users/songsong/.rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/Users/songsong/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/Users/songsong/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment

```

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [10월 10, 2016, 12:09오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/18 "2016-10-10T12:09:11Z")

</div>

Can you run the following? I still can’t recreate this and so I’m trying to figure out why Vagrant is behaving differently for you and @Mihai_Raulea than it is for me.

```plaintext
cd /vagrant
ruby -v
bundle check
bundle show sprockets

```

I have

```plaintext
vagrant@discourse:/vagrant$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
vagrant@discourse:/vagrant$ bundle check
The Gemfile's dependencies are satisfied
vagrant@discourse:/vagrant$ bundle show sprockets
/home/vagrant/.rvm/gems/ruby-2.3.1/gems/sprockets-3.6.3

```

---

<div class="post-metadata">

### Author: ![shisongsong](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shisongsong](https://meta.discourse.org/u/shisongsong)
#### Post date: [10월 10, 2016, 3:22오후 UTC](https://meta.discourse.org/t/installing-locally-through-vagrant/50874/19 "2016-10-10T15:22:21Z")

</div>

I solved it, the error shows:

```
No such file or directory @ rb_sysopen - /Users/songsong/.rvm/gems/ruby-2.3.0/gems/ember-data-source-2.3.0.beta.5/dist/ember-data.js

```

So I checked the /Users/songsong/.rvm/gems/ruby-2.3.0/gems/ember-data-source-2.3.0.beta.5/, no /dist dictionary here.

Then I uninstall the ember-rails gem and modify Gemfile: I remove the version after gem ‘ember-rails’, next run bundle install again, and it worked for me.  
Thanks a lot 😅
