Bundler Failing to Build Native Extensions

It was apparent that my 2011 MacBook Air needed a rebuild when it would sit, sometimes up to three minutes after coming back from sleep, screen lock, or restart, loading the login screen. I have worked at three different places of employment with this laptop, each place requiring a number of different processes and applications running on the machine in order for me to work effectively. It had finally become out of control and enough was enough. I wiped the machine and performed a fresh install of Mavericks.

Everything was going very smoothly until it came to install my gems for the current Rails project I am working on. Every single time I would try to bundle install gems, I would get the same error, for different gems. The one erring out below happens to be the do_postgres gem, but the error was always the same:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for postgres.h... yes
checking for mb/pg_wchar.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-pgsql-server-dir
--without-pgsql-server-dir
--with-pgsql-server-include
--without-pgsql-server-include=${pgsql-server-dir}/include
--with-pgsql-server-lib
--without-pgsql-server-lib=${pgsql-server-dir}/
--with-pgsql-client-dir
--without-pgsql-client-dir
--with-pgsql-client-include
--without-pgsql-client-include=${pgsql-client-dir}/include
--with-pgsql-client-lib
--without-pgsql-client-lib=${pgsql-client-dir}/
--with-pqlib
--without-pqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created

extconf failed, exit code 1

I must have Googled a hundred sites. Most answers I found suggested to install the Xcode command line tools. I did that. And did it again. And probably again, just because I’m a little insane like that. Other people suggested that it was a Postgres issue and simply uninstall Postgres, reinstall and observe the magic. There was no magic for me. Nothing.

Frustrated, I typed gem install do_postgres from the command line, not using bundler. It worked! But why? Finally my awesome husband and I sat down to figure this out.

We found an issue similar to mine here and TimMoore stated “I’d bet that the problem is that Bundler itself is installed as gem under the system Ruby, rather than the one in ~/.rubies.” Bingo.

I use rbenv to manage my Ruby versions. It seemed for some reason bundler was using the system Ruby rather than what was specified by rbenv. I wish I could go back in time to verify this, but odds are, for some reason, I installed bundler before I installed rbenv. I don’t know why I would have done that, and I honestly do not remember. We updated the /usr/bin/bundler to look in /Users/jpayne/.rbenv/shims/ruby rather than /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby and that worked.

I, of course, was not going to accept that updating that file was the solution, so I uninstalled bundler, went back into my project directory (with my rbenv gemset in place) and reinstalled bundler. I then did a bundle install to try it out and was extremely pleased to discover that building the native dependencies for all gems had been successful.

My laptop is now a bit speedier because of the rebuild, and I have my project up and running again.

What a Year

And a rough one it has been. I’ve been trying to find my footing in a new life, figuring out how to do things on my own since my husband and I separated in April. This has left little time for blogging, but I hope that the new year will be a far better one, in many ways. I really do have so much to write about, and I need to get all of that down, hopefully in a neat little year-end wrap-up. mark this as my pledge to have something meaningful on this blog in the coming week, however, this is not a resolution. I’m so done with those.

I Hate Mowing Grass

I hate mowing grass. No. Let me rephrase – I detest it. My backyard is fenced in and it’s impossible to get my dad’s huge riding mower in so I would have to use the push mower to keep the grass at bay.

The other day, my dad (the king of grand ideas, rember?) suggested I get a new lawnmower that would make my most detested task a little easier. No, not one of those fancy green ones with the deer on the side or even the old fashioned spinning blade ones.

Behold, I present to you my new lawnmower. His name is Star.

 

l_1600_1200_7934623E-A80F-48F0-BDC3-E7E63475D42F

Let the Training Begin!

As I’ve spoken of before, I’ve decided to go all-in when it comes to participating in Canoe Trails, a program aimed at building outdoor skills and character in youth and adults alike. This program was one of the best things that ever happened to me and after a 15 year hiatus it is about time that I give back.

This weekend marked the first training session for the new year and what a session it was. About 12 Candidates were present and they spent the day learning about personal equipment, tying knots, group equipment, parts of the canoe, and picking up and carrying the canoe, all extremely important aspects of the program. They also learned the rules of the program regarding respect and how the words “I can’t” are probably the most terrible words in our vocabulary today.

As I helped a Candidate learn to tie knots and saw the frustration she felt when one of the knots just would not click, I remember how I thought I would never be able to tie the same knot 20 years ago. I stood by and saw the surprise in the eyes of Candidates when shown the food packs and learned how heavy these packs would be to carry when fully loaded with food and supplies for 21+ people. I participated in the talk with the female Candidates about “doing your business” in the woods and how we try to be as protective of our environment as possible, and I felt the fear and triumph in of the girls as they tried (and eventually succeeded) in picking up a canoe by themselves for the first time. I heard and reveled in the talk from one of the most senior male members of the group as they recounted how girls can do anything the guys can do, and sometimes do those things better.

The training is not easy; It’s difficult and very foreign in this day and age. Many of the methods and ideas have been around for years, passed down from generation to generation and it’s not always easy to understand why we do the things we do. Most of the understanding will come with the actual application, in overnight training sessions in Tionesta, PA. There we’ll teach canoeing, putting up a tent, chopping wood, gathering water, orienteering with map and compass, and cooking over a fire. Each Candidate will likely cry, want to go home, be frustrated, and want to quit at one point, as I once did, and each Candidate will realize that they can do, and even excel at, every task put before them.

To be perfectly honest, I am nervous. Nervous because things have changed so much since I was in the program and because I’m concerned that after all of these years I am pretty rusty. I’ve had to humble myself and let the younger Voyageurs remind me how to tie a bowline knot and am still struggling wondering if I can pick up a canoe. All I know is that I’m ready to go. I’m ready to push my limits again and try to teach and learn things on the way. I was taught by the best and I still remember a lot.

I’m also working to bring a new generation up in the program. Pretty much against her wishes, I’ve been bringing Aidyn along to work nights and training and even though she’s sometimes bored, she’s been doing pretty well. Although she won’t be a true Candidate until she turns 13, she’s already starting to learn about the program and I even observed her learning knots yesterday. I hope that one day she loves the program as much as I do and will want to do all she can to help keep it going. Until then, I’m back in full force, determined to better myself and help out as much as I can and I’m enjoying every scary, fun, amazing moment of it.

Snow Trails Ear Warmers

PICT2829-300x269

I reverse engineered the pattern for these warm ear warmers from one that was knit probably back in the 1980’s. They’re typically worn over the berets worn by Post members heading out on Snow Trails adventures in lieu of a larger wool hat but they’re equally functional worn simply as a headband. I’m told Mrs. Wildman, the wife of the late Mr. Wildman, former Canoe Trails leader, would crank out these practical ear warmers during Post meetings.

The two strands of yarn held together make these ear warmers super warm and durable, and the slipped stitches along with the pattern increases and decreases create a sort of cup that envelopes the ear instead of sitting right against it.

Size
23″ circumference unstretched

Materials

  • 90-100 yards Worsted Weight Wool (I used Cascade 220 and Plymouth Galway with comparable results)
  • Size US 9 needes

Notes
Hold two strands of yarn together throughout.

k1, p1 rib:
Right side: sl1, *k1, p1*, repeat between * until two stitches remain, k2.
Wrong side: sl1, *p1, k1*, repeat between * until two stitches remain, p2.

cdd:
centered double decrease. sl2 tog, K1, pass the slipped stitches over (together)

m1f:
make one front, or make one left. From the front, lift loop between stitches with left needle, knit into back of loop.

Ear Warmers
With two strands of yarn held together, cast on 11 stitches.
Work k1, p1 rib pattern for two inches, ending with right side row.

Begin increases:
You will be increasing two stitches every wrong side row to produce the ear cover.
On wrong side: sl1, p1, knit into the back and front of next stitch, m1f, *p1, k1*, repeat between * until last two stitches, p2.
On right side: sl1, *k1, p1*, repeat between * until last two stitches, k2.
Repeat previous two rows five more times until there are 23 stitches on the needle.

Work k1, p1 rib pattern 7 times, ending with right side row.

Begin decreases:
You will be decreasing two stitches every wrong side row.
On wrong side, sl1, p1, move the working yarn to the back and cdd, *p1, k1*, repeat between * until last two stitches, p2.
On right side: sl1, *k1, p1*, repeat between * until last two stitches, k2.
Repeat previous two rows five more times until there are 11 stitches on the needle.

Work k1, p1 rib pattern for 7 inches. This is where you could increase or decrease the length to fit a larger or smaller head.

Repeat increases and decreases to form second ear cover.

Work k1, p1 rib pattern for 2 inches.

Bind off, sew back seam together.

PICT2834-300x290

I’m a Sucker For Punishment (or I’m Going Winter Camping)

When I was in my teens and early twenties, I was fortunate enough to participate in Canoe Trails, an outfit dedicated to teaching skills and traditional ways of a time that has long since passed – the time of the Canadian Voyageur. Candidates trained over the course of a few months on weekends, learning skills such as chopping wood, fire building, tent-raising, outdoor cooking, map and compass reading, general survival tactics, and of course, canoeing, in order to participate in a week-long adventure up north. I enjoyed many summer trips to the Canadian wilderness with this group and loved them. Somehow though, I never made it on any of the winter camping trips, aka Snow Trails, because I was always busy with basketball and/or school, but mostly because I was a wimp and afraid of the sub-zero temperatures common on such trips.

I must be feeling a need to return back to my roots, because lately I’ve really felt an incredible desire to be involved with Canoe Trails again. I finally got up the courage to do so at the end of the fall, unfortunately leaving little time for canoeing, but just enough time to try out winter camping. A few weeks ago, the initial planning meeting was held and we went over the necessary equipment needed to not freeze to death during a January weekend spent entirely outdoors in the mountains in Pennsylvania. It’s a lot of equipment and it’s taking me a while to find/acquire all that I’ll need to stay happy for that weekend. With each item I acquire, the more excited I get. I think of the logs that will be split with my hand axe and how my legs will not be cold in the German military-issue wool pants I ordered from an Army/Navy surplus store. I imagine what it will be like carrying all of my personal items in my pack that hasn’t seen the light of day in years and how many times I’ll fall over walking on snowshoes. I feel like I am going crazy but I can’t wait to split wood, prepare food over a fire, sleep outside in the snow, and catch up on a lot of years of missed adventures.

I think the upcoming weekend is going to be an eye-opening experience. It’s going to be a time for me to get back to understanding myself and how I work, push my limits, and remember what it’s like to be out in the world without a computer or a phone.

The trip is scheduled for the second weekend in January and I look forward to talking about it when I get back.