Tag Info

Hot answers tagged

27

Thanks to this thread I found out that the reason it fails to install is because of ... a path pointing the wrong way when the package was compiled. Thankfully the solution is very simple: sudo gem uninstall mysql sudo apt-get install libmysqlclient-dev -y sudo gem install mysql Note: I got an error message trying to uninstall mysql, but that's ...


26

I had the exact same problem when setting up RVM on my new Mac this morning: $ ruby -v dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib Referenced from: /Users/psoshnin/.rvm/rubies/ruby-2.1.3/bin/ruby Reason: image not found To solve the issue I first ran: $ brew update && brew upgrade Then I ran: $ rvm reinstall 2.1.3 --disable-binary ...


19

Method 1 – railsready If you don't want to do everything manually, you can use the railsready script, which will install for you: An updated system (Linux only) Ruby 1.9.3 latest patch level (installed to /usr/local/bin/ruby) or RVM running 1.9.3 latest patch level Imagemagick libs needed to run Rails (sqlite, mysql, etc) Bundler, Passenger, ...


18

Famous one – I can haz IP: $ curl icanhazip.com 1.2.3.4 And that's it.


17

What you're looking for is called "deduplication". While it's usually implemented by vendors of specialized storage products, the ZFS filesystem implements it as well. Most Unix-derived operating systems can make use of ZFS, and I'd therefore recommend it as the first place to look.


13

If you use Pacifist then it's possible to just reinstall Ruby. Insert your OS X DVD Run Pacifist Select "Open Apple Install Discs" Select the disc Search "Ruby.framework" Right click and select "Install to Default Location" This will reinstall Ruby, to setup the symlinks from /usr/bin to point to it use Pacifist again: Search "Contents of BSD.pkg" ...


12

I use bash when my primary focus is on file handling. This could include moving, copying, and renaming files, as well as using files as input for other programs or storing other program's output in files. I rarely write bash code that actually examines the contents of a file or generates the output to write to a file; I leave that to the other programs ...


12

Seeing "Broken pipe" in this situation is rare, but normal. When you run type rvm | head -1, bash executes type rvm in one process, head -1 in another.1 The stdout of type is connected to the "write" end of a pipe, the stdin of head to the "read" end. Both processes run at the same time. The head -1 process reads data from stdin (usually in chunks of 8 ...


9

You may look on this project: http://rush.heroku.com/


8

I'll post the answer here for anyone else having the same trouble. The App Store seems to have killed my Xcode 3.2.2 install without actually installing 4.1 (maybe it would work better with a new version of Xcode installed, or no version at all). The App Store did download an Install Xcode.app file, which I used to complete the install -- it did this ...


8

You do need a special SMTP server, but you don't need to set it up yourself. As somebody has already suggested, you can create a bogus Gmail account and use the SMTP for that. Or, for really anonymity, you can use a SMTP provider; this will allow you to forge your return address (the same way spammers do) for an extra layer of anonymity and customization ...


8

Homebrew does not work out of the box with XCode 4.3. You also need to install the Command Line Tools for Xcode. You can do this by starting XCode and going to Preferences->Downloads->Command Line Tools and click on install. Or get them mannually from https://developer.apple.com/downloads/index.action. Finally I had to call xcode-select -switch ...


7

To download a single gem use (using loudmouth gem as an example): gem fetch loudmouth Fetching: loudmouth-0.2.4.gem (100%) Downloaded loudmouth-0.2.4 to download all gems that your Rails 3 app depends on run: bundle package This will download all gems (and their dependencies) and place them into vendor/cache (without installing them). You can then ...


7

Normally under Ubuntu you need to do: sudo update-alternatives --config ruby That will allow you to set the default to any available version of ruby installed on your system. This is easily installed from repositories.


7

Given a problem that both can handle, you'll want to use the one you're most comfortable with. Ultimately, there are a lot of small details, and only experience can teach you to see them. Bash is a general purpose scripting language just like Python, Ruby, Perl, but each has different strengths over the rest. Perl excells at text analysis, Python claims to ...


7

To hit it every two minutes: while true; do curl yourwebsite.com >/dev/null; sleep 120; done If you want this to run all day and night, use some kind of job-scheduling service like cron (but no while loop, of course).


7

I found a way to do it without having to use MacPorts. Thanks to a shell script to Install ImageMagick on Snow Leopard, I was easily able to run the script and have ImageMagick and all of its dependencies installed automatically. First you need to download the script. If you have git installed... cd ~/src git clone ...


6

You should use apt-get If you care about uninstalling gems with their dependencies. RubyGems will not uninstall unused dependencies. See do-i-have-to-manually-uninstall-all-dependent-gems. If you care about uninstalling gems as a group, rvm is also an option (see below). If that gem would or should install executables in /usr/bin. If you want to upgrade ...


6

This worked for me: brew update && brew install gmp && rvm reinstall 2.1.3


6

This can occur if you install Vagrant in a folder containing spaces. For example, C:\Program Files\HashiCorp\Vagrant instead of the default C:\HashiCorp\Vagrant. Two solutions are available to you: Reinstall Vagrant to a folder without any spaces (eg. the default installation folder) Modify your PATH environmental variable to use the legacy folder ...


6

As my physics teacher used to say, "It's not as simple as it looks… it's simpler than that." Command arguments – in both Linux and Windows – are space-delimited, and mkdir processes each one separately. So when you run mkdir bin lib lib/NAME test, it creates directories named after each argument, separately. It is basically equivalent to: mkdir bin mkdir ...


5

You can fix a broken pipe at the expense of another process by inserting tail +1 in your pipe, like this: type rvm | tail +1 | head -1 The +1 option tells tail to print the first line of input and everything that follows. Output will be exactly the same as if tail +1 wasn't there, but the program is smart enough to check standard output and closes the ...


5

To get a list of the names of your gems, do gem list --no-versions. Make a directory (such as gem-exports) Save that list to a file inside that directory, then remove the headers and empty lines. (The automation options are for *nix systems.) Take that list and xargs gem unpack < $LISTNAME inside the directory. This should take the gem names and run ...


5

OS X does not come with ImageMagick installed by default. The ImageMagick home page provides a binary installation, although they recommend using MacPorts instead. I would recommend using MacPorts as well, since it is a great package management system that keeps you up to date with your Unix-like software versus Apple's provided versions. Having said that, ...


5

Check the makefile for a 'make uninstall' target. Sometimes they come with those. Failing that, the best you can do is carefully read the 'make install' target and then manually undo what it did.


5

Just delete /System/Library/Frameworks/Ruby.framework, /Library/Ruby, and erb, gem, irb, rdoc, ri, ruby, and testrb from /usr/bin. Warning: OS X expects and sometimes relies on frameworks and software shipped with the system. It would be a very bad idea to remove the system Ruby. It might even get replaced next time you update OS X -- or it might not, but ...


5

I am editing a document I created and published to the web for another difficult problem, and adapting it to your question. I cannot be 100% sure that the Resource Kit tools will work with XP, but I believe they probably will. 1) Create a batch file to run your script and start your Ruby server. To be frank, I don't have enough info to tell you how to do ...


5

brew remove package_name_here brew cleanup


5

Temporarily fix the PATH, directly in the broken shell: export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin (This is my PATH, it should mostly work for you as well) Give yourself write permissions for that file, with or without fixing PATH as above: /usr/bin/sudo /bin/chmod u+rwx ...



Only top voted, non community-wiki answers of a minimum length are eligible