# rails plugin question

**URL:** <https://discuss.rubyonrails.org/t/rails-plugin-question/5141>\
**Category:** rubyonrails-talk\
**Created:** [November 28, 2006, 3:48pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141 "2006-11-28T15:48:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bala\_Paranj](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Bala\_Paranj](https://discuss.rubyonrails.org/u/Bala_Paranj)\
**Post date:** [November 28, 2006, 3:48pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/1 "2006-11-28T15:48:15Z")

</div>

When I run the command

./script/plugin install [http://multi-up.ca/code/validates\_email\_format\_of](http://multi-up.ca/code/validates_email_format_of)

I get an error message. When I run it again, it gives plugin already installed message. I have a model class with email field and when I run the unit test it fails saying that it does not recognize validates\_email\_format\_of call in my model class. Am I missing something here? Why is not recognizing the installed plugin?

I am using Rails 1.2 release candidate. TIA. BCP

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [November 28, 2006, 5:02pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/2 "2006-11-28T17:02:30Z")

</div>

Bala

> I get an error message. When I run it again, it gives plugin already installed message. I have a model class with email field and when I run the unit test it fails saying that it does not recognize validates\_email\_format\_of call in my model class. Am I missing something here? Why is not recognizing the installed plugin?

.. because it's not installed !! If you check your vendor/plugins directory, you'll notice that the plugin was not installed but that an empty directory was created. That's why you get an error the 2nd time you try and intall it. You must either manually delete the empty directory, or use the install --force option.

Alain

---

<div class="post-metadata">

**Author:** ![Bala\_Paranj](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Bala\_Paranj](https://discuss.rubyonrails.org/u/Bala_Paranj)\
**Post date:** [November 28, 2006, 7:02pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/3 "2006-11-28T19:02:01Z")

</div>

Thank you. I will check it. I was just wondering my Rails project is in Subversion, so doing

./script/plugin install [http://multi-up.ca/code/validates\_email\_format\_of](http://multi-up.ca/code/validates_email_format_of)

won’t work? Do I need to install it using another method that uses Subversion?

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [November 28, 2006, 7:18pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/4 "2006-11-28T19:18:11Z")

</div>

Bala,

> ./script/plugin install [http://multi-up.ca/code/validates\_email\_format\_of](http://multi-up.ca/code/validates_email_format_of) won't work? Do I need to install it using another method that uses Subversion?

If you simply click on the plugin url, you'll notice that it requires authentication. You should contact the plugin author &nbsp;&nbsp;&nbsp;&nbsp;[http://www.agilewebdevelopment.com/plugins/validates\_email\_format\_of](http://www.agilewebdevelopment.com/plugins/validates_email_format_of)

Alain

---

<div class="post-metadata">

**Author:** ![Bala\_Paranj](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Bala\_Paranj](https://discuss.rubyonrails.org/u/Bala_Paranj)\
**Post date:** [November 28, 2006, 9:15pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/5 "2006-11-28T21:15:49Z")

</div>

That’s why I tried

### Validates As Email

- Validates dates against a regular expression that supposedly represents the syntax of RFC822 email addresses.

> readme: [https://svn.greenpeace.org/repositories/rails\_plugins/validates\_as\_email/tags/0.1.4/README](https://svn.greenpeace.org/repositories/rails_plugins/validates_as_email/tags/0.1.4/README)

> svn: [https://svn.greenpeace.org/repositories/rails\_plugins/validates\_as\_email/tags/0.1.4](https://svn.greenpeace.org/repositories/rails_plugins/validates_as_email/tags/0.1.4)

This site can be accessed. In this case, if I do:

script/plugin install –o [https://svn.greenpeace.org/repositories/rails\_plugins/validates\_as\_email/tags/0.1.4](https://svn.greenpeace.org/repositories/rails_plugins/validates_as_email/tags/0.1.4)

It should work right? I will try this when I get back home.

---

<div class="post-metadata">

**Author:** ![Bala\_Paranj](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Bala\_Paranj](https://discuss.rubyonrails.org/u/Bala_Paranj)\
**Post date:** [November 29, 2006, 3:34pm UTC](https://discuss.rubyonrails.org/t/rails-plugin-question/5141/6 "2006-11-29T15:34:18Z")

</div>

I checked the vendor/plugins directory, it was empty. When I ran:

script/plugin install –o [https://svn.greenpeace.org/repositories/rails\_plugins/validates\_as\_email/tags/0.1.4](https://svn.greenpeace.org/repositories/rails_plugins/validates_as_email/tags/0.1.4)

It installed the plugin successfully. I found this tip in James Adams Plugins book. I also looked at the test directory of the plugin and did the same assert in my unit test.
