Setting up a local Drupal development environment on Ubuntu 12.10

I’ve recently started developing with the Drupal content management framework.  I did a lot of work with Drupal in the past, but haven’t done much work with the platform since Drupal 6.  While it still feels a bit strange coming from MVC frameworks and more expressive languages, it seems like Drupal and PHP have come a long way in offering a fluid development experience in the last few years.  This is how I set up my development environment in Ubuntu 12.10, though it probably works for newer releases of Ubuntu or other Debian-based Linuxes.

# Add the PHP5 PPA
sudo add-apt-repository ppa:ondrej/php5 
sudo apt-get update

# Install PHP5.  This will also install a recent version of Apache
sudo apt-get install php5

# Install PEAR, this will make it easier to install drush
sudo apt-get install php-pear

# Install drush via PEAR
pear channel-discover
sudo pear channel-discover
sudo pear install drush/drush

# HACK: The first time I ran drush it needed to install some dependencies via PEAR, 
# but I ran drush as my user so I didn't have permissions to write to the global PEAR
# directory.  Work around this by running drush with sudo and then chmoding your
# ~/.drush directory back to your own user.  You can probably just install the
# dependencies using PEAR.
sudo drush
sudo chown yourusername:yourgroupname -R ~/.drush

# For local development, I like using SQLite
sudo apt-get install php5-sqlite

# drush dl/en needs crul
sudo apt-get install php5-curl

# Drupal needs GD
sudo apt-get install php5-gd


Floodlight is a web-based platform for telling community stories from people, places and organizations around the Denver metropolitan area.  The project was originally supported by The Piton Foundation and funded in part by a grant received as part of the Knight Foundation Community Information Challenge.


Lead developer


Since many of the stories told on Floodlight are about work being done in particular Denver, Colorado neighborhoods, authors needed to be able to tag their stories with boundary geographies (cities, neighborhoods, zip codes) or provide addresses of specific places, which are automatically geocoded and associated with boundary geographies.

For this project, I relied on the excellent spatial data support of the PostGIS database and abstractions offered by the Django Frameworks ORM to implement a data model and create scripts to easily load new boundary geographies from shapefiles and define their relationships with other boundaries.

Users searching for stories in their community can use a faceted browsing interface that not only filters based on address and boundary geography, but also other taxonomies.  In order to integrate these different types of filters, I used the Solr search server.  On the front end, the Backbone framework provides an interface to the faceted browse and the Leaflet mapping library is used to display boundary geographies and story markers based on the user’s filters.

The application is powered by a RESTful API that is consumed by a Backbone-based story builder.

In addition to the web platform, the project also included a great capacity-building component.  Team members conducted “story raising” events that trained community members in different digital storytelling skills and a “story navigator” worked with community groups to discover and tell stories using the platform.

More Information






I was talking with Chiara last night about feeling like Bloomington was centered around changing to meet the needs of people like me (20-something, ostensibly middle-class, “creative class” types), and she was saying how she felt like any kind of city policy, even the support of social services had an underlying capitalist motivation (making the city more “livable” for a certain class of potential residents).  Strangely, I randomly came across this report at work, presented by city councilperson Steve Volan, titled PRELIMINARY REPORT ON THE “COLLEGE-DRIVEN METROPOLITAN AREA” that seems to speak to many of these motivations.

From the report:

Bloomington hasn’t really been a “college town” for at least a
quarter-century. It’s time for us all to retire that term. The
town you may remember from your childhood has broken away; it’s
now a metropolitan area, an enormous university the core of its
economic engine, an area complete with downtown apartments, 2
million bus riders a year, and enough bitchin’ restaurants to take
the Fort Wayne Convention & Visitors’ Bureau in a fight. This is a
core city now, with suburbs, even exurbs. The mayor now holds
state of the community addresses jointly with the county. We can’t
go back.

While I agree that looking at Bloomington’s growth relative only to the University is a simplistic analysis, the idea of economic growth as an underlying goal gives me the shivers.  I guess I just think that there is more to the idea of a community than the economy, and I think that an economy-focused understanding of community does not place all members of the community on equal footing in terms of power and decision making.


the best laid plans

So the last minute letter writing/knitting event didn’t go so well.  It was basically just me and Shannon hanging out, knitting, and telling stories, which was fine.  Doing the research for the event, I learned a lot more about the Finelight’s development plans, the connectedness of the individuals driving the development, and the rapid pace of the plans.  If you’re interested in sorting through a big stack of articles about the brief history of these really serious chnages, I’d be happy to share.  I’ve also uploaded the handout that I made with the addresses of some of the stakeholders in the development project.  Link

In the end, I got a tiny bit of mitten knitting done, and wrote this letter to the HT.:

Mayor Mark Kruzan may remain optimistic about the future of Finelight’s development plans on Kirkwood, but the actions of the business community and city government in the last year leave me with nothing but a sense of dread.  Whether the final reality for Bloomington will be Finelight’s “plan A” or “plan B”, the city has already been adversely affected by these plans.  We can see this both in the loss of Ladyman’s, a longstanding and singular community nexus that brought Bloomingtonians together across divisions of class, race, lifestyle, and generation, and the pending temporary displacement of some of the Shalom Center’s essential community services.

Many of the proposed timelines for development at the corner of Kirkwood and Washington move at an alarming pace.  Whether it is the patrons of Ladyman’s, those who receive services from the Shalom Center, or, quite possibly, users of public transportation in Bloomington, many in our community have been or will be affected by these decisions.  It is disrespectful and irresponsible to proceed at a pace at which it seems impossible to acknowledge and accommodate the realities of all whose lives will be changed by development in Bloomington.  We have already felt the weight of what can be lost or changed by decisions.  What will the community, as a whole, gain or have constructed by Finelight’s plans?  Have the proposal’s supporters in the city government, business community, and local media been able to answer this fundamental question?

Even though both Ladyman’s and the Shalom Center have received support or offers of support from the city in an attempt to soften the impact of development decisions, within the current structure of political and economic power in Bloomington, those institutions are at the mercy of the decisions of others, and as an extension of that, so are the people served by those institutions.  As people living in Bloomington, we must ask ourselves, do we want to live in a community where priceless assets such as Ladyman’s or the Shalom Center must constantly maneuver to accommodate forces shaping our community, or where they are the institutions that drive changes in our community?  At the very least, can their voices and needs, can all of our voices and needs, play an equal part in shaping the future of Bloomington?

The Herald Times’ December 19 opinion piece about Finelight’s plans spoke of the contributions of Bloomington’s “mostly younger, mostly creative-class” population to local business and to the community as a whole.  To hinge the benefits of such a group of people solely on Finelight’s ability or inability to construct a new headquarters in downtown Bloomington seems exaggerated.  Certainly, this allegedly beneficial population shares a great deal in common with the university community, a population that, for better and for worse, will not be leaving Bloomington any time soon.  In the end, though, even as a member of the much heralded and accommodated “mostly younger, mostly creative-class” segment of Bloomington’s population, I don’t want to see this community transformed to so exclusively facilitate my livelihood or lifestyle or that of people like me.  Even in the cafe’s absence, we would do well not to forget the reality that Ladyman’s so clearly exposed – that as Bloomingtonians, our lives are much closer than our apparent divisions, and that if we are to prosper, we should prosper together.

media coverage of ladyman’s closing

I guess I’m still trying to figure out my feelings about all of this. I’m collecting a list of articles about Ladyman’s to make it easier for people like me, fairly recent Bloomington transplants who have only a recent history with the diner, understand the history of the place and what its closing represents as part of the changes happening in Bloomington. I think the media coverage is also useful for helping to identify the people in our community responsible for those changes, or at least those who can make decisions about what gets closed, what gets built, how it’s funded, and how much community input is taken into account in the decisions made.

So far, I’m thinking that if there’s one thing that’s good about Ladyman’s closing at its long-time location and not reopening, it’s that the closing drives home the point that things that take a long time to build, that are really, truly, important to a community, are not so resilient and easily replaced. It’s incredibly sad, that something that took nearly 50 years to build into what it was will be replaced by something that will take only a few months. It’s also sad that something that brought people together across lines of generations, race, and class will be replaced by something that is used by and relevent to only a small group of people. Ladyman’s as a convergence of Bloomingtonians from all walks of life is an idea that I’ve been talking about for a long time to friends, but when I looked around the restaurant this past Sunday, I saw how true that really was. With the diner gone, I find it very difficult to think of many other spaces that offer such a meeting point for the community at large.

I was talking to my friend Chris the other night and he was mentioning the keynote speech at this past year’s bioneers conference and how it discussed the idea of designating and protecting places of importance to a community. I asked my friend Will, who recently studied historic restoration of houses, what gave places some kind of protection as historic places. He said that it usually had to do with some historic event happening there, some famous person living there, or the structure being architecturally relevent. It’s so frustrating that there is some precedence to protecting places around these criteria, but not protecting places that bring a community together and that are part of so many people’s personal histories.

I really like the idea of making new development take as long as the things it replaces.  I would feel much better about Finelight having it’s corporate headquarters and a supporting parking garage if it took 49 years to achieve those things.  I look at all the new businesses that have gone in around Smallwood Plaza and 10th and College and other things in the downtown area, and even in the 3 years that I’ve lived in Bloomington, I’ve seen so many things come and go.  Do we really want the physical and commercial reality of our community to be so fleeting and unsubstantial?
Good-bye Ladyman’s
by Steven Higgs
Bloomington Alternative December 3, 2006

Cafe’s closing brings end to cook’s 49-year career
By Kasey Hawrysz
Indiana Daily Student Wednesday, December 06, 2006

Update: J.J. Perry, news editor at the Herald Times sent me the following links to the HT’s coverage of the Ladyman’s closing. He also has authored a blog post, Covering Ladyman’s final weekend, that contains additional links to information about Ladyman’s closing.

Ladyman Family Gathers to Say Farewell
Herald Times December 11, 2006

Last Meal at Ladymans
Herald Times December 11, 2006

Ladyman’s menus: 1957 vs. 2006
Herald Times December 12, 2006

VIDEO: Cook Jack Covert: A Ladyman’s Legend
Herald Times December 8, 2006

SLIDESHOW: Five decades of Ladyman’s
Herald Times

Read our readers’ memories of Ladyman’s
Herald Times December 4, 2006

Ladyman’s guestbook
Herald Times December 8, 2006

SUBMIT: Share your favorite Ladyman’s memories and well wishes here
Herald Times

online inventory replication batch program update

The Boxcar online inventory replication program wrapper batch file wasn’t working right because the SSH tunnel to the MySQL server kept dying. So, I modified the wrapper to test to make sure the server was up and then restart the service if it’s not before running the replication. The code looks like this:

mysql --user=*** --password=*** --batch --execute="SELECT value FROM online_status WHERE config = 'online'" boxcar_mirror
net stop "MySQLTunnel"
net start "MySQLTunnel"
cd "C:\Documents and Settings\n\Desktop\inventory and sales\online stuff\"
.\shutdown -u

more on development

So I was ranting in the lobby at Bullwinkles, and the person I was talking to said, “If it wasn’t for IU, Bloomington would be another Spencer”.  This is completely true.  The same thing that makes Bloomington a frustrating place in the years since I’ve moved here is also what has made it pretty sweet in the first place.  It’s hard to reconcile my feelings with that reality, and the only way that I can make sense of it is to think in terms of wasted potential.  It seems too defeatist for me to adopt a personal “at least it’s not Spencer” standpoint – I’d rather think that Bloomington could be (can be?) a really exceptional place instead of a resignedly, marginally better place.

As I was riding to work today, I passed a storefront that will be the new home of Roadworthy Guitar and Amp whose exisiting storefront will be displaced by the new Finelight offices.  The move-in date was listed as some time in October and it terrifies me a little of all that could happen in my abscence.

bloomington development

The Von Lee Theater on Kirkwood Ave. in Bloomington is getting turned into an upscale bar/restaurant, maybe some offices. With a lot of development, I think there’s always this horrified idle speculation that feels like an urban legend when it comes to understanding what it is that’s being developed. For a long time, there was this black plastic tarp covering the fence, and this was the first time that I noticed the tarp gone and could see how little of the structure was still intact. It literally stopped me in my tracks as I was riding my bike down Kirkwood.

Here is a photo of the Von Lee in earlier days:

Von Lee Theater

And more recently when it stood closed for years:

Vacant Von Lee Theater

I guess, at some level, I’m not anti-development. I understand that people want places where they can meet and share and interact and this is why people go to the mall even though the mall sucks and this is why people in my rural hometown really do hang out at Wal-Mart. What is sad, is that you have something like a movie theater which is a space that is pretty universally interesting, I mean, everyone likes movies right? And then its turned into a space, like an upscale restaurant that is relevent and accessible and interesting to much fewer people.

Last night, Ryan made the argument that at least downtown development is better than sprawl, but what I see is that downtowns in towns like Bloomington are ceasing to be the focal point, the shared physical space, for the entire community, and starting to be this theme park for only one part of population, be it yuppies or students. The spaces that are shared by everyone end up being the malls and the strip malls and the sprawl and the big boxes and the sad thing is that the way they’re constructed, or entirely mediated by commerce means that the potential for people’s interactions when they’re sharing that space are so much more limited.

Ladyman's Cafe

As I was riding to my job, I ran into Jeremy Hogan outside of Ladyman’s Cafe. He was waiting to take some photos of Baron Hill who was having a pre-election community meet and greet at the diner this afternoon. And it was so disheartening because it all seemed so fake. The downtown diner is still appealing to politicians as this icon of street-level democracy, and there is some reality to that, to the convergence of college students and retirees each having their own debates over cups of coffee. But in the case of Ladymans, that space is being destroyed, disappeared. So I find it hard to believe that democracy can exist when we don’t even allow the spaces that we exploit as the image of democracy to exist.

On a similar stream of consciousness, I got an e-mail from Mylo Roze that included a bunch of articles about anti-homeless policies and crackdowns around the country, and he predicted the rise of similar sentiments and actions in Bton:

These articles (below) are relevant to Bloomington in that there are Food not Bombs food dispensing operations in town & also cook-out services by churches in People’s Park & other parks, surely to become more of an issue as Bloomington is gentrified & urbanized.
Also, once the new building is finished where the Von Lee theater stood (next to People’s Park) issues may arise.
Maybe it should be addressed pre-emptively, to be allowed by statute, as a preventative measure.
There has already been a purging of homeless people from the I.U. campus & the new bldg. replacing the Von Lee will house I.U. offices. There is a general tendency among the well-off to segregate the poor, remove the homeless from public view (& therefore tourists) & assume that existing agencies are adequately addressing such issues & that all homeless people are addicts or mentally ill. Note the authorities quotes about determining who is homeless & charging charities with misdemeanors.

Boxcar Inventory Development Update

I updated the new_order form so that textbooks from MBS and Nebraska are automatically entered in as used:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.datestamp = Now()
If Me.distributor = “MBS Textbook Exchange” Or Me.distributor = “Nebraska Book Company” Then
Me.book_state = “Used”
Me.book_state = “New”
End If
Me.status = “On Order”
If IsNull(Me.Order_date.Value) Then
Me.Order_date = Format(Now(), “DD-MMM-YYYY”)
End If
End Sub

I also created a query, “Make Textbooks Used” to fix already entered textbooks.

For the online store, I added an in-store pickup option for shipping.  In the development version of the online inventory, I made it so shipping methods and properties are pulled from the database instead of hard-coded in.