# Code in install.rb

**URL:** <https://www.ruby-forum.com/t/code-in-install-rb/136160>\
**Category:** Rails\
**Created:** [April 29, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/code-in-install-rb/136160 "2008-04-29T14:35:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohsinHijazee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Post date:** [April 29, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/code-in-install-rb/136160/1 "2008-04-29T14:35:25Z")

</div>

Hi!  
If I add some code that uses ActiveRecord::Base.connection.execute  
method to create and remove a table respectively on each install and  
uninstall in the install.rb and uninstall.rb of a plugin that I am  
writing for myself, then would it work?

---

<div class="post-metadata">

**Author:** ![MohsinHijazee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Post date:** [April 29, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/code-in-install-rb/136160/2 "2008-04-29T19:08:21Z")

</div>

there’s a rails db:create that I’ve seen floating around. Not sure if  
you can call things similarly in install.rb or not.  
-R
