osx-mountain-lion

Detect hardware headphone presses in mac

依然范特西╮ 提交于 2019-11-28 21:22:11
问题 This question is concerning the code from this question: Detect headphone button presses in OS X Their answer was marked correct, however I couldn't get their code to work (this may be because of my lack of knowledge of objective-c). I followed their instructions, and modified three files. This is what I have tried (I have also looked at Apple's IOKit documentation and could not find any headphone hardware button documentation): AwesomeClass.h #import <Cocoa/Cocoa.h> #include

Bundler cannot install any gems without sudo

荒凉一梦 提交于 2019-11-28 17:13:23
I'm trying to install a rails app and every time I use bundle it fails without sudo . My current situation is that everything works as long as use sudo for everything , including rails. I don't think this is correct. For example: $ bundle update Updating git://github.com/refinery/refinerycms.git Fetching gem metadata from https://rubygems.org/....... Fetching gem metadata from https://rubygems.org/.. Resolving dependencies... Enter your password to install the bundled RubyGems to your system: Using rake (10.0.4) Using i18n (0.6.1) Using multi_json (1.7.2) Using rack-cache (1.2) Using rack-test

ImageMagick: Error while running convert: convert: unable to read font

坚强是说给别人听的谎言 提交于 2019-11-28 17:08:31
I'm on Mountain Lion and installed ImageMagick using Homebrew (minimagick is also in my Gemfile but I don't think that's relevant). SimpleCaptcha uses it in a Rails app to create CAPTCHAs. However, the image isn't created cause of this error: Error while running convert: convert: unable to read font `/usr/local/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1123. convert: Postscript delegate failed `/var/folders/gd/n7rzfhkd5jd0ws8jnzsz34hr0000gn/T/magick-vzHHz4ZP': No such file or directory @ error/ps.c/ReadPSImage/830. convert: no images defined `/var/folders/gd

Error installing Rmagick on Mountain Lion

瘦欲@ 提交于 2019-11-28 15:19:11
I have seen other people with the same issue of installing RMagick on Mountain Lion However none of the suggested solutions have allowed me to successfully install rmagick. Here is the error message I am getting: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. checking for Ruby version >= 1.8.5... yes checking for /usr/local/bin/gcc-4.2... yes checking for Magick-config... yes checking for ImageMagick version >= 6.4.9... yes checking for HDRI disabled version of ImageMagick... yes checking for stdint.h... yes checking for sys/types.h... yes checking for wand

Install gitk on Mac

只谈情不闲聊 提交于 2019-11-28 15:13:57
Does anyone know how to install gitk on Mac? From their official website, it seems gitk comes with git, but the version of my git ( git version 1.7.12.4 (Apple Git-37) ) does not come with gitk. brew install gitk does not work for gitk. Version info (copied from comments): OS X 10.8.2 (12C2034) "Mountain Lion" XCode Version 4.6 (4H127) Jenna Pederson Correct, the 1.7.12.4 (Apple Git-37) does not come with gitk. You can install a more recent version of git which comes with gitk by using brew. More thorough instructions located here: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew

Socket File “/var/pgsql_socket/.s.PGSQL.5432” Missing In Mountain Lion (OS X Server)

China☆狼群 提交于 2019-11-28 15:08:50
I just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQL that I did last year when I first installed Lion Server. When I try to do any kind of PostgreSQL terminal command I get the following notorious error message that many have gotten over the years: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? I was attempting to change the password for _postgres when I got the error. I tried several

Valgrind reports leaked memory on OS X 10.8.1

僤鯓⒐⒋嵵緔 提交于 2019-11-28 13:47:55
I'm using Valgrind version 3.8.0 on OS X 10.8.1, Mountain Lion. Regarding compatibility with 10.8.1, Valgrind's site says (italics mine): Valgrind 3.8.0 works on {x86,amd64}-darwin (Mac OS X 10.6 and 10.7, with limited support for 10.8). I know, then, that there is only "limited support" for 10.8.1. Nonetheless, this bug report says (italics mine): This (the latest 3.8.0 release) makes Valgrind compile and able to run small programs on OSX 10.8. Be warned however that it still asserts with bigger apps, and 32 bit programs are not checked properly at all (most errors are missed by Memcheck). Ok

Conditional categories in Mountain Lion

笑着哭i 提交于 2019-11-28 12:32:12
Mountain Lion introduced new APIs , some of which we had implemented as categories in our project. For examples, we have a category NSColor+CGColorAdditions that implemented CGColor and colorWithCGColor: for NSColor . These methods have been added in Mountain Lion. Ideally, we would like to use these categories if the client OS is older than Mountain Lion, and not use them if it's Mountain Lion. How can we do this? Or is there a better alternative? NSColor *_NSColor_colorWithCGColor_(Class self, SEL cmd, CGColorRef cgColor) { // make an NSColor outta `cgColor` and return it return nsColor; } /

.bash_profile corrupted not found, command not found… Help restore it back to the original [duplicate]

社会主义新天地 提交于 2019-11-28 11:15:22
问题 This question already has an answer here : How to restore .bash_profile on a mac? None of my unix terminal are working [closed] (1 answer) Closed 3 months ago . I was playing with the installation of Mongo db on my mac... and in exporting the Mongodb/bin dir to PATH .. looks like I corrupted the bash_profile and now I can't find it.. This is what I did : nano ~/.bash_profile The file did not exist, so I went ahead created one and added the following line export PATH={$PATH}:~/mongo/bin So now

pg gem '0.14.0' on Mountain Lion fails

我与影子孤独终老i 提交于 2019-11-28 10:52:21
I just upgraded from OS X Lion to OS X Mountain Lion. My rails environment for the most part stayed in tact. The only steps I had to do to get things back to a good state was: - Install XCode 4.4 - Install XCode 4.4 Command Line Tools - Install gcc-4.2 So all that went well. Here's the issue, almost all my gems install properly when I run bundle install except for one of the most important ones I need - the postgresql gem 'pg'. And it specifically fails for versions above 0.12.2. I'm using ruby 1.9.3p125. I can successfully grab the 0.12.2 pg gem, and versions below, but they give me