Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Exception Notification plugin install issue
4 Posts
Exception Notification plugin install issue

Hi Mohnish,

There is much confusion among the Ruby gems and Rails plugin.

Leave a link that I found interesting in clarifying some concepts:

"totd_6_difference_between_ruby":http://blogs.oracle.com/arungupta/entry/totd_6_difference_between_ruby

In general, when you install a gem in your Ruby environment you can use it in all Rails applications on the same Ruby environment (if the gem is compatible with the version of Rails to use).

For example, if you install the will_paginate gem, any new application can use it too.

If you are using Rails 2.x, it is desirable that the environment.rb file of each new application that uses this gem add a dependency to this gem.

Following the example of will_paginate, it would, within the initializer block:

Rails:: Initializer.run do |config|
#....
  config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'
# ..
end

(you can add the version and the source you want)

Thus, if the gem is not installed, the application will not load and demonstrative a message that you can not find this gem. To install this gem, and any other, you can use:

rake gems: install

and all necessary gems will be installed.

On the other hand, you can use a Rails plugin instead of a gem. In this case, the plugin will be installed inthe folder: my_app/vendor/plugins/ and the scope is for that application.

Many sources of plugins were passed to "github":https://github.com/ , so you should make sure the plugin source is correct (it may even be many branches of the same plugin)

For install the plugin in exception_notification Rails 2.x you could use git clone (For the log, I assume you are using Windows).

Eg. from the root of your project:

C:\ror\my_app>git clone git://github.com/jeremyevans/exception_notification.git vendor/plugins/exception_notification

where you will get something like:

Initialized empty Git repository in C:/ror/my_app/vendor/plugins/exception_notification/.git/ remote: Counting objects: 180, done. remote: Compressing objects: 100% (81/81), done. remote: Total 180 (delta 87), reused 165 (delta 81) Receiving objects: 100% (180/180), 25.60 KiB, done. Resolving deltas: 100% (87/87), done.

and see the plugin installed on my_app\vendors\exception_notification

Then, u could follow the instructions my_app\vendors\exception_notification*README* to configure and use it.

Make sure you have git installed, if not, you can use eg. "msysgit":http://code.google.com/p/msysgit/ and verify that the version of the plugin you use is compatible with your Rails version.

I hope you can install and use the plugin.

Let me know if you need some extra help.

"Fernando":http://fernandotobar.com.ar/

Person
Forum Rating: 100
Sign In To Rate Post

Mohnish, send the scripts/about result.

Probably you have problem with the Net connection or some DNS issue at your side..

Hi,

I am a newbie to rails. I am trying to install the exception notification plugin into my rails app and get it up and running, I am unable to do it.

In case of plugins do we just need to copy and paste them in our vendor/plugins directory.If thats done we need not install them explicitly?, in order to get them up & running(integrate them) in our rails app.

If its an external plugin, we need not give a require "plugin_name" in our enviroment.rb file? Is that given only when we make use of ruby gems?

I already have exception_notification (1.0.20090728) gem installed in my gem list, I am using Rails 2.0.2, Ruby 1.8.7 for project specific purpose.

Apart from this, I have a exception_notification plugin copied to my vendor/plugins directory.

Could you please tell me if there would be a conflict between the gem and the plugin? If so how should I deal with it, how do I make sure that only the plugin is used and not the gem?

The error I am currently getting when I try to install the exception_notification plugin is:-

mohnish@pc146724-desktop:~/railsprg/2011/Jan11/10jan11_blogs/blogs$

ruby script/plugin install exception_notification

/usr/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill': execution expired

(Timeout::Error)

      from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
      from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
      from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
      from /usr/lib/ruby/1.8/net/http.rb:2024:in `read_status_line'
      from /usr/lib/ruby/1.8/net/http.rb:2013:in `read_new'
      from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'
      from /usr/lib/ruby/1.8/open-uri.rb:248:in `open_http'
      from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
      from /usr/lib/ruby/1.8/open-uri.rb:242:in `open_http'
      from /usr/lib/ruby/1.8/open-uri.rb:616:in `buffer_open'
      from /usr/lib/ruby/1.8/open-uri.rb:164:in `open_loop'
      from /usr/lib/ruby/1.8/open-uri.rb:162:in `catch'
      from /usr/lib/ruby/1.8/open-uri.rb:162:in `open_loop'
      from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
      from /usr/lib/ruby/1.8/open-uri.rb:518:in `open'
      from /usr/lib/ruby/1.8/open-uri.rb:30:in `open'
      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:869:in `ls'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:865:in `collect'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:865:in `ls'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:391:in `index'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:378:in `plugins'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:386:in `each'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:305:in `find_plugin'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:304:in `each'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:304:in `find_plugin'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:154:in `find'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:766:in `parse!'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:765:in `each'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:765:in `parse!'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:476:in `parse!'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:492:in `parse!'

      from

/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/plugin.rb:923

      from

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'

      from

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

      from script/plugin:3

I am unable to figure out whats the reason behind this and what steps need to be taken to rectify this. Any suggestions?

Thank you..

4 Posts
Login to add your message