osx-lion

How can I switch to ruby 1.9.3 installed using Homebrew?

天大地大妈咪最大 提交于 2019-12-17 07:02:12
问题 I have installed ruby 1.9.3 using hombrew brew install ruby But default 1.8.7 is still used. How can I switch osx to use 1.9.3 as default ruby? 回答1: I suggest you take a look at rvm. You can then set it as default with rvm use 1.9.3 --default But if you are happy with your homebrew install. Then just change the precedence of directories in the PATH Here is my /etc/paths # homebrews should always take precedence /usr/local/bin # the default stack /usr/bin /bin /usr/sbin /sbin This is important

Mac OSX Lion DNS lookup order [closed]

房东的猫 提交于 2019-12-17 07:01:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . After upgrading to Mac OSX Lion I figured out that /etc/hosts is not looked up in first place for name resolution anymore. This leads to some side effects like: Entries in /etc/hosts are resolved painfully slow You can't not override existing domains, e.g. 127.0.0.1 www.google.com If you get search domain

Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?

╄→гoц情女王★ 提交于 2019-12-17 06:19:42
问题 This question may look like a duplicate of: How to uninstall postgresql on my Mac (running Snow Leopard) however, there are two major differences. I'm running Lion and I'm trying to uninstall PostgreSQL 9.0.4. I've looked at the last question and the link that it referenced, but I did not find a file called "uninstall-postgresql" when I run this command: sudo find / -name "*uninstall-*" So, I assume this means that the uninstall process for 9.0.4 is different than that of 8.x. I've seen a

Issue updating Ruby on Mac with Xcode 4.3.1

ぃ、小莉子 提交于 2019-12-17 05:45:14
问题 I'm using RVM to install it and it gives me this error: The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`. I'm on Lion 10.7.3 and I have Xcode 4.3.1. 回答1: Short answer is you can grab RVM master branch (not stable) to build it with LLVM (not gcc, I mistyped initially). It has appropriate patches to make 1.9.3-p125 to run (at least better) with Xcode 4.3.1 by default. I provided the patch. If you already installed

Why does cURL return error “(23) Failed writing body”?

ぃ、小莉子 提交于 2019-12-17 04:21:58
问题 It works ok as a single tool: curl "someURL" curl -o - "someURL" but it doesn't work in a pipeline: curl "someURL" | tr -d '\n' curl -o - "someURL" | tr -d '\n' it returns: (23) Failed writing body What is the problem with piping the cURL output? How to buffer the whole cURL output and then handle it? 回答1: This happens when a piped program (e.g. grep) closes the read pipe before the previous program is finished writing the whole page. In curl "url" | grep -qs foo , as soon as grep has what it

View-based NSTableView with rows that have dynamic heights

狂风中的少年 提交于 2019-12-17 02:39:08
问题 I have an application with a view-based NSTableView in it. Inside this table view, I have rows that have cells that have content consisting of a multi-row NSTextField with word-wrap enabled. Depending on the textual content of the NSTextField , the size of the rows needed to display the cell will vary. I know that I can implement the NSTableViewDelegate method - tableView:heightOfRow: to return the height, but the height will be determined based on the word wrapping used on the NSTextField .

Why am I getting a “C compiler cannot create executables” (successfully written C code prior to this and compiles that)?

丶灬走出姿态 提交于 2019-12-14 04:25:50
问题 This is the error I am getting when typing ./configure : checking build system type... x86_64-apple-darwin11.3.0 checking host system type... x86_64-apple-darwin11.3.0 checking target system type... x86_64-apple-darwin11.3.0 checking whether the C compiler works... no configure: error: in `/opt/ruby-1.9.3-p125': configure: error: C compiler cannot create executables See `config.log' for more details As is obvious by above, I am trying to compile the Ruby source code. I did some research but

Mac OS X Lion - mysql: command not found

丶灬走出姿态 提交于 2019-12-14 03:16:45
问题 I have installed MySQL from this source, installation was successfully finished. But when I run in terminal which mysql , the output is empty. When mysql , the output is -bash: mysql: command not found Also, I updated bundle and ran the app - the result: /Users/adam/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': Incorrect MySQL client library version! This gem was compiled for 5.5.28 but the client library is 5.6.12. (RuntimeError) Can I ask you for help how to

Apache and two versions of php on osx-lion

我怕爱的太早我们不能终老 提交于 2019-12-14 01:24:50
问题 I have to version of PHP installed on my lion osx /opt/local/bin/php (5.3.12) /usr/bin/php (5.3.10) When I try to install php modules using port , it refers to /opt/local/bin/php (5.3.12) But when I start the web server the apache is using /usr/bin/php because if I look to the phpinfo on the apache webserver it tells me PHP Version 5.3.10 . How can I fix this issue? My goal is to install php-modules using port which affects the php used by apache. 回答1: Apache is using neither of those

Installing Scrapy on Lion - libxml/xmlversion.h not Available

为君一笑 提交于 2019-12-13 18:13:11
问题 I used home brew and install python with the $ brew install python --framework Then I install easy_install to install pip, After that as the Scrapy Website says, I use pip install to install Scrapy but looks like XCode is missing some libxml files. In file included from src/lxml/lxml.etree.c:314: /private/var/folders/h6/xl6c12wn67n_9j7jl60b_j843908_z/T/pip-build-auduwage/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h"