Using Vagrant for Rails Development Discussion
I'm getting this information when I put in the first comment. Is this still the way to use Vagrant with Ruby on Rails development?
:
Vagrant is no longer distributed as a RubyGem. Please download the latest
version for your operating system from the URL below. If you still wish
to use the RubyGem version, you can manually install version 1.0.7. Note that
the RubyGem version hasn't been updated in over a year and will no longer
receive any updates.
Prior to installing Vagrant using the installer, make sure you uninstall
all your Vagrant gems, since they sometimes conflict.
If you want to learn more about why we don't distribute using RubyGems
anymore, please read this: http://mitchellh.com/abando...
Sounds like you installed the vagrant rubygem before. You'll want to uninstall that and download it from vagrant's website instead.
It is weird. When I ssh inti vagrant and run pwd I see `/home/vagrant` but when I run ls I don't see any files.If I run `ls /vagrant' I see all my files though that are being synced.
This boggled my mind for at least 4 or 5 hours.
If I `cd /vagrant` and `ls` I'll see all my files. But if I run `pwd` from there I am in `/vagrant`.
Is anyone else confused why vagrant would create a folder in my home folder `/home/vagrant` but actually sync with `/home`??
So happy now that I have figured this out!!! :D
Do I need to have rails set up on my main machine also for this to work? Everything seems fine until I run 'bundle' and it says, "The program 'bundle' is currently not installed..." - I see that someone else has this issue as well, but I don't see a workable solution. I'm just wondering if this is happening because I don't have rails installed on my windows machine. I was hoping I could avoid doing that for this solution.
I found the problem. I had installed the vagrant plugins on a previous attempt and didn't realize I needed to do it again. After installing the plugins again and provisioning everything worked as it should.
Excuse me, why yesterday with "bin/rails s" with webrick (and also Puma) I can open the localhost:3000 and today (with nothing changed) I can't and have to start with "bin/rails s -b 0.0.0.0" ???
Hi thanks for the tutorial. I can't get bundle installed. I get this: Could not locate Gemfile or .bundle/ directory
Have anymore gotten this problem?
Runy
What I don't understand is this. If I'm making an app called testapp and then also work on another app called testapp2. Do I need to go in the /vagrant directory and then put there rails new testapp and rails new testapp2? So do these rails apps go IN the vagrant folder?
My set up is as follows:
I created a folder called railsprojects
I did vagrant init from within this folder railsprojects.
I had NO rails apps installed in this folder.
So I went to this folder railsprojects
Then I did vagrant up
And then vagrant ssh.
And now I want to start creating rails apps. I have many rails apps to create and they all use the same virtual machine.
In which folder should I run the rails new testapp comment?
Many thanks.
Runy
Where is my synced folder, I have created a project in vagrant, but I can not find in my local system, somebody help me please!!!.
I m getting error like these. May be i miss something?
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Atlas, make sure the box is
released.
Name: ubuntu/trusty64
Address: https://atlas.hashicorp.com...
Requested provider: ["vmware_desktop", "vmware_fusion", "vmware_workstation"]
Awesome tutorial!
Do the other developers on the same team who don't have Vagrant yet have to install plugins as well?
Can someone please clarify what the Vagrantfile should look like if you wanted rails to be installed automatically on vagrant up? :-) Thanks for the tutorial btw! I've got it up and running. I just want to be able to automate it further for future use and still have a bit to learn about Chef and Vagrant.
I followed the whole post and successfully configured everything. But when I've restarted the system and opened vagrant linux terminal in the folder and run following command 'cd /vagrant' & 'ls', I'm not able to see the files in the directory. It happened to me 3 times and every time I had to do all the process again copying all my progect files into other folder and all commands of vagrant, all updates of ubuntu and rails again every time. Someody please help why is the link between vagrant getting vanished once the system is restarted?
Hey Chris! As always my man! Thanks for another great screencast. After going through the tutorial notes, I couldn't get the server up and running. Then I checked out the video and you mentioned using 'rails server -b 0.0.0.0' to start the rails server and it worked. Might want to include that in the documentation
Also, there is another resource I found that might be helpful... https://railsbox.io/
Take care and thanks again...Best!
Thanks for your guide! I am kinda stuck though!
1. Right after the installation of Vagrant and then VB, what is the next step? I just opened a cmd and went from there. Didn't know what else to do.
2. Since I am in Windows 7 x64 I am getting the "'touch' is not recognized as an internal or external command, operable program or batch file." message. Any workarounds ?
Thanks
Edit for anyone wondering.
1. I am using Cygwin with some extra plugins to implement commands like top, diff and a few others. It is the best option when working in Windows and want to do simple stuff.
2. Using Cygwin I can use the touch command.
However since "touch" is not availiable in windows, this tutorial should instuct the user to use this command. So if you are having trouble in this step of the tutorial, when instructed to "touch Cheffile" simply create a file at the specific folder you are working on and name it Cheffile.
Thanks for this tutorial Chris. Works fine for me, but I've encountered 1 problem during `vagrant up` on my Windows 10 x64 Box:
%userprofile%/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/download.rb:23:in `unlink': Permission denied @ unlink_internal - %userprofile%/.vagrant.d/tmp/VBoxGuestAdditions_5.0.10.iso (Errno::EACCES)
This post on stackoverflow help me to solve it http://stackoverflow.com/qu...
But I think that's just a "workaround" of some real problem that was reported here: https://github.com/refile/r... and here: https://openedx.atlassian.n... too.
I am getting the error "ERROR: You must specify at least one cookbook repo path". Will come back if I figure it out. The only changes I have made to Chris' code is making it Postgres instead of MySQL.
I hadn't run the line `vagrant plugin install vagrant-librarian-chef-nochef`. I have done that although now Chef installation takes so long I stopped it. 1hr + so I don't think that classifies for 'This can take a while.`
This might really become useful and really helpful for them to have especially that people might need to know on how are they going to use some certain kind of tools that will surely guide them with their work or will going to help them in promoting something for their work.
I'm getting this error after "vagrant up"
from C:/Users/JorgeAnzola/.vagrant.d/gems/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:354:in `block in http_get'
folloewd by a bunch of code lines. Does any one knows how to solve it?
when "vagrant plugin install vagrant-librarian-chef-nochef", i get error "Could not find gem 'vagrant-librarian-chef-nochefvagrant (>= 0) ruby' in any of the gem sources listed in your Gemfile or available on this machine."