Helps
Using bundler seems to break some Rails plugins which try to extend Rails objects, such as Loofah, and no one is sure why. Probably something in the load order is different. A “workaround” is to find other ways of including functionality in your models, such as including modules in an
ApplicationModelbase class, which you should probably do anyway. Still, does anyone know what’s going wrong?On a few of our Snow Leopard machines, we’ve seen git slow to a crawl. Rebooting seems to fix it temporarily. We haven’t seen it on our Leopard machines. Anyone else seen this or have a fix?
Interesting
On one of our projects, we have a rake task called
deployed:versionswhich sshes into each of our deployment boxes finds the git version which is deployed, and presents the results in a nice table. It’s been a handy tool, and you may want to write one for yourself, especially if your project deploys to lots of boxes and environments like ours.If you’re using Snow Leopard and Firefox 3.6, you may have some issues with sqlite3 (of all things). Sauce Labs have fixed this in their Sauce RC, which is a replacement for Selenium RC. You don’t have to use Sauce RC to get the fix; just download it and replace the JAR files in Selenium RC with theirs.
Speaking of Selenium did you know it has great drag and drop support? Here’s a Cucumber step for dragging items in a jQuery UI Sortable list:
When /^I drag “([^"])” above “([^"])”$/ do |dragged_item, dropped_item|
li = lambda { |text| %{//ul[contains(@class,"ui-sortable")]/li[contains(string(),"#{text}")]} }
selenium.drag_and_drop_to_object(li[dragged_item], li[dropped_item])
endOn one project, have a lot of commits called “WIP” (”Work in progress”). It’s not a very useful message. Some people have taken to squashing their branches into a single commit before they put them on master. When there are lots of commits on a branch, this is also not very useful, as the details of what happened get lost. Instead, we’re striving to give commits good names and not squash them. When we do need to make a WIP commit, such as when we push work in progress at the end of the day, we amend to it later and give it a meaningful name.
When it’s time to rebase onto master, you can do this:
code(master)$ git rebase -i origin/master
That
-imeans “interactive”. Your editor can open, and you can tell git to squash meaningless commits into other commits they belong with. You’ll get a chance to give the frankensteined beast a new commit message. You can also reorder, skip, or edit commits this way; seegit help rebasefor details.
selenium-rc 2.2.1 from gemcutter should also fix any issues you are seeing with FF and selenium. It has the latest version of the selenium server. (2.0b, I believe). If you’re still having problems, we should upgrade the jar in selenium-rc.
Are you using pivotal-selenium-rc (from github)? That version is out of date.
February 21, 2010 at 10:06 am
> On one of our projects, we have a rake task called deployed:versions
> which sshes into each of our deployment boxes finds the git version
> which is deployed, and presents the results in a nice table. It’s been a > handy tool, and you may want to write one for yourself, especially if
> your project deploys to lots of boxes and environments like ours.
Any chance you guys open source this little tool?
This is very useful indeed, do u know http://github.com/pivotal/erector/blob/master/lib/erector/widgets/environment_badge.rb & http://labnotes.org/2009/10/08/using-a-badge-to-distinguish-development-and-production-environments/ ?
I guess these goodies would be nice features to push to Rails as at some point 80% of teams have the same problem.
Thanks Peter and other pivots for your blog. I skim through every week and always find interesting info :-)
February 25, 2010 at 3:38 am
@Jean-Michel: Unfortunately, there isn’t any useful code in there that isn’t specific to our app and deployments. It could be a nice cap task if it was written the right way, but we just banged it out to solve the problem at hand.
And I agree: I’ve made environment badges myself a few times over, and it would be nice to have it built into Rails.
March 3, 2010 at 7:22 am