Vagrant plugin issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Vagrant plugin issue

Madhurranjan Mohaan
Hi ,

I have vagrant 1.2.2 installed and I just began to try my hand at a plugin.  Read through the documentation and looked at  vagrant up plugin and generated a gem following the guidance here - http://docs.vagrantup.com/v2/plugins/packaging.html

However,after installing it with "vagrant plugin install", I start seeing errors:

 INFO environment: Local data path: /Users/M/Projects/vagrant/autosetup/.vagrant
 INFO environment: Loading plugin from JSON: vagrant-my-plugin
ERROR root: Failed to load plugin: vagrant-my-plugin
ERROR root:  -- Error: #<LoadError: cannot load such file -- vagrant-my-plugin>
ERROR root:  -- Backtrace:
ERROR root: /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant.rb:186:in `require_plugin'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:768:in `block in load_plugins'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:765:in `each'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:765:in `load_plugins'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:132:in `initialize'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `new'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `<top (required)>'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: The plugin "vagrant-my-plugin" could not be found. Please make sure that it is
properly installed via `vagrant plugin`. Note that plugins made for
Vagrant 1.0.x are not compatible with 1.1+ and this error will likely
continue to show when you use `plugin install` with a 1.0.x plugin.

The plugin "vagrant-my-plugin" could not be found. Please make sure that it is
properly installed via `vagrant plugin`. Note that plugins made for
Vagrant 1.0.x are not compatible with 1.1+ and this error will likely
continue to show when you use `plugin install` with a 1.0.x plugin.

 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
 INFO loader: Set :root = #<Pathname:/Users/Madhurranjan/Projects/vagrant/autosetup/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :home, :root]
 INFO hosts: Host class: VagrantPlugins::HostBSD::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001030b4ce0>
 INFO cli: CLI: [] nil []

Can someone please help here ?

thanks
Ranjan

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant plugin issue

Takahiro Fujiwara
Hi,

There are some different points to use plugins on the development environment.
First, you have to install your vagrant into the bundle environment.
Second, when you load your plugin, you have to call this method on your Vagrantfile.

    Vagrant.require_plugin "vagrant-my-plugin"

And you don't need to install the plugin you are developing with "vagrant plugin install" command.
It is mentioned at the end of the article you read.

Sorry for my dirty English.
I hope that it helps you.

--
Takahiro Fujiwara

twitter: @wutali

On Thursday, August 1, 2013 at 4:41 AM, Madhurranjan Mohaan wrote:

Hi ,

I have vagrant 1.2.2 installed and I just began to try my hand at a plugin.  Read through the documentation and looked at  vagrant up plugin and generated a gem following the guidance here - http://docs.vagrantup.com/v2/plugins/packaging.html

However,after installing it with "vagrant plugin install", I start seeing errors:

 INFO environment: Local data path: /Users/M/Projects/vagrant/autosetup/.vagrant
 INFO environment: Loading plugin from JSON: vagrant-my-plugin
ERROR root: Failed to load plugin: vagrant-my-plugin
ERROR root:  -- Error: #<LoadError: cannot load such file -- vagrant-my-plugin>
ERROR root:  -- Backtrace:
ERROR root: /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant.rb:186:in `require_plugin'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:768:in `block in load_plugins'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:765:in `each'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:765:in `load_plugins'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:132:in `initialize'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `new'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `<top (required)>'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: The plugin "vagrant-my-plugin" could not be found. Please make sure that it is
properly installed via `vagrant plugin`. Note that plugins made for
Vagrant 1.0.x are not compatible with 1.1+ and this error will likely
continue to show when you use `plugin install` with a 1.0.x plugin.

The plugin "vagrant-my-plugin" could not be found. Please make sure that it is
properly installed via `vagrant plugin`. Note that plugins made for
Vagrant 1.0.x are not compatible with 1.1+ and this error will likely
continue to show when you use `plugin install` with a 1.0.x plugin.

 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
 INFO loader: Set :root = #<Pathname:/Users/Madhurranjan/Projects/vagrant/autosetup/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :home, :root]
 INFO hosts: Host class: VagrantPlugins::HostBSD::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001030b4ce0>
 INFO cli: CLI: [] nil []

Can someone please help here ?

thanks
Ranjan

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.