Uninstall Extension

962 views
Skip to first unread message

Matthew Dundas

unread,
Aug 19, 2013, 10:54:32 AM8/19/13
to spree...@googlegroups.com
Hello,
I installed the spree_bootstrap extension.  Unfortunately it didn't work, i got alot of errors.  I'll investigate later.  But for now i want to uninstall it so i can show other people my work.

How do i uninstall a spree extension?

thx
md

Weston Platter

unread,
Aug 19, 2013, 3:52:44 PM8/19/13
to spree...@googlegroups.com
Hi Matthew,

The https://github.com/jdutil/spree_bootstrap rails install generator, 
bundle exec rails g spree_bootstrap:install

Therefore, remove JS and CSS references. There are no db migrations at the time I'm replying to this so don't worry about the migrations part of the install_generator.rb.

Nate Lowrie

unread,
Aug 20, 2013, 8:48:37 AM8/20/13
to spree...@googlegroups.com
Matthew,

The easiest way to uninstall an extension is to revert the commit that you made when installing it. Typically, when installing a gem, after I add to the gem to the gemfile, bundle, and run the install generator, I will do a commit to git. If I ever need to uninstall it, I know exactly what has been changed and can revert the changes with a single command.

If you don't use source control (and you should), what Weston said is the best way.

Regards,

Nate

Matthew Dundas

unread,
Aug 20, 2013, 11:03:09 AM8/20/13
to spree...@googlegroups.com
Thanks i removed the JS / CSS references successfully.

Nate - this is interesting.  I suppose the key point is not to include anything else in the commit.
But what if i've done 10 commits since then.  Doesn't it get hairy then?

-matt

Nate Lowrie

unread,
Aug 20, 2013, 2:55:53 PM8/20/13
to spree...@googlegroups.com
Matt,

The nice part is that that if you have done 10 commits and need to back out, then you can still look at that particular commit to see exactly what you changed when installing that extension. You should be able to back those changes out manually and commit them in another commit in this case. This can be invaluable if you have made changes in later commits to the same files that the extension modified and you need to keep those changes.

Regards,

Nate

Matthew Dundas

unread,
Aug 21, 2013, 3:15:00 PM8/21/13
to spree...@googlegroups.com
Okay so its up to the developer to manage it, but i like your idea of isolating the change in a single commit.

Ryan Bigg

unread,
Aug 25, 2013, 8:53:34 PM8/25/13
to spree...@googlegroups.com
Nate's advice to do the changes in one isolated commit is dead on. You should use this advice for all changes in your code. If you can't back out a change without backing out other changes then you need to split up your commit into different pieces.

I do this in Spree by using `git add -p` which allows me to add specific patches for a commit rather than whole files. I'd recommend you use that too.
--

Ryan Bigg
Community Manager
Spree Commerce, Inc.
Reply all
Reply to author
Forward
0 new messages