vagrant shareããããããã
vagrant shareãåãã£ã¦ããã®ãè¦ãããã®ã§
æ©é使ã£ã¦ã¿ãã
ææ°çãinstall
こちらãã1.5.0ãDLãã¦installãã¾ãã
Vagrant Cloudã«ç»é²
こちらããã¢ã«ã¦ã³ããç»é²
username + mail address + passwordãå
¥åããã ãã®ç°¡åãªï¼ry
vagrant upãã¦ã¿ã
こちらã¨こちらã®è¨äºã§ä½æãã¦ããkitchenã使ç¨
ä»åã¯rails serverã«ã¢ã¯ã»ã¹ãåãããã®ã§guest: 80, host: 3001ãæå®
$ vi Vagrantfile
+ config.vm.network :forwarded_port, guest: 80, host: 3001
$ vagrant up
Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:
rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems
The error message is shown below:
Bundler could not find compatible versions for gem "celluloid":
In Gemfile:
vagrant (= 1.5.0) ruby depends on
celluloid (>= 0.15.2) ruby
vagrant-berkshelf (>= 0) ruby depends on
celluloid (0.14.1)
ã¨ã©ã¼ãã§ãã
ã¨ããããè¨ãããéãã«ããã
$ rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems $ vagrant up `unlink': Permission denied - /hogehoge/.vagrant.d/boxes/base/virtualbox $ sudo rm -rf /hogehoge/.vagrant.d/boxes/base/virtualbox $ vagrant up There are errors in the configuration of this machine. Please fix the following errors and try again: Vagrant: * Unknown configuration section 'berkshelf'. * Unknown configuration section 'omnibus'.
ãã£ãæ¶ããããpuluginãããä¸å
$ vagrant plugin install vagrant-omnibus $ vagrant plugin install vagrant-berkshelf The plugin(s) can't be installed due to the version conflicts below. This means that the plugins depend on a library version that conflicts with other plugins or Vagrant itself, creating an impossible situation where Vagrant wouldn't be able to load the plugins. You can fix the issue by either removing a conflicting plugin or by contacting a plugin author to see if they can address the conflict. Vagrant could not find compatible versions for gem "celluloid": In Gemfile: vagrant-berkshelf (>= 0) ruby depends on celluloid (~> 0.13.0) ruby vagrant (= 1.5.0) ruby depends on celluloid (0.15.2)
調ã¹ããこんなpull requestããã£ãã®ã§ãã®branchã使ç¨ãã¦ã¿ã
$ git clone https://github.com/chulkilee/vagrant-berkshelf.git $ cd vagrant-berkshelf/ $ git branch 26f7477ca66790b5c34c6326eca63147461d0e70 $ git checkout 26f7477ca66790b5c34c6326eca63147461d0e70 $ echo 'require "bundler/gem_tasks"' > Rakefile $ bundle exec rake build $ vagrant plugin install pkg/vagrant-berkshelf-1.4.0.dev1.gem $ vagrant up
ããã辺ã§ä½ããã£ã¦ãããã¯こちらã®è¨äºã¨åãæãã§ãã
ç«ã¡ä¸ãã£ããï¼é·ãã£ã
shareãããï¼
shareããåã«rails serverãç«ã¡ä¸ãã¨ã
$ vagrant ssh $ cd /rails_dir $ rails server
ã¨ããããlogin
$ vagrant login Username or Email: Password (will be hidden):
å
ã»ã©ç»é²ããusername or email + passwordãå
¥å
æåããã°ãYou're now logged in!ãã£ã¦è¨ãããã
$ vagrant share ==> hoge: Detecting network information for machine... hoge: Local machine address: 192.168.50.25 hoge: Local HTTP port: 3000 hoge: Local HTTPS port: disabled ==> hoge: Checking authentication and authorization... ==> hoge: Creating Vagrant Share session... hoge: Share will be at: slow-dugong-8574 ==> hoge: Your Vagrant Share is running! Name: slow-dugong-8574 ==> hoge: URL: http://slow-dugong-8574.vagrantshare.com
http://slow-dugong-8574.vagrantshare.com
ãããurlãªã®ã§ãã©ã¦ã¶ã§ã¢ã¯ã»ã¹ãã¦ã¿ã¾ãããã
railsã®ãWelcome aboardãã表示ãããã¨æãã¾ãã
railså´ã®logãã¢ã¯ã»ã¹ããã度ã«ãã£ããæµãããã¨ã確èªåºæ¥ããã¨
ã¹ããã§ã¢ã¯ã»ã¹ãã¦ããããªæãã§ã¡ããã¨è¡¨ç¤ºããã¾ãã
æ°ã«ãªããã¿ã¼ã³ã試ãã¦ã¿ã
rails serverãæ¢ãã¦ã¿ã
- HTTP/1.1 500 Internal Server Errorãããã£ã¦ãã
rails serverãç«ã¡ä¸ãã¦åã³ã¢ã¯ã»ã¹
- ãYour share has expired. We'll show this page to anyone who visits this link and display the following message:ãã表示ããããshareã«æéãããã®ãï¼
ããä¸åshareãã¦ã¿ã
- ä»åº¦ã®URLã¯ãããhttp://difficult-bear-8438.vagrantshare.comããµããã¡ãå¤ãã£ã¦ã
shareããã£ã¦ã¿ã
- ãYour share has expired. We'll show this page to anyone who visits this link and display the following message:ãã表示ãããã
ã¾ã¨ãã¦ããª
- æåããã¨ãã¯æãã声ãåºãã»ã©ãã³ã·ã§ã³ããã£ãw
- ä»åã¯vagrant-berkshelfããã¾ãå ¥ããªãã£ãã®ã§ãã«ããã«ããã£ããã©ãpull requestãmergeãããã°åé¡ãªããªãã¯ã
- ãä»äºã§ä½¿ãå ´åã¯çæãããURLã¯èª°ã§ãã¢ã¯ã»ã¹åºæ¥ããã¨ã«æ³¨æããªãã¨ãããªãã(æä½ébasicèªè¨¼ããã¦ããã¨ã)
- 500 Internal Server Errorãè¿ãã¦ããç¶æ ã§åæã«shareãåãã¦ããã®ã§ãã©ã®ã¿ã¤ãã³ã°ã§shareãåæã«åããã®ã調æ»ããã
- ã¾ã ããã¥ã¡ã³ãããã«ããå®å ¨ã«èªãã¦ããªããshare以å¤ã«ãè²ã ããã¿ãã