Tag Info

Hot answers tagged

23

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 ...


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, ...


16

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.


10

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 ...


10

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" ...


10

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


9

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 ...


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 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

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.


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

Try using Homebrew and/or RVM RVM allows you tO have several versions of ruby installed if you want. Homebrew is a nice package manager for Os X.


5

# Install 1 or more gems gem install rails gem install aws-sdk # Then run these 2 commands to create bin links brew unlink ruby brew link ruby # Finally open a new terminal session (no idea why but it worked for me)


5

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 ...


5

Use Ruby Version Manager. It was meant for keeping multiple versions of Ruby in the same system, even allowing them to use different Gem sets and configurations. You won't mess with your system's Ruby as well, which is another benefit. All your Rubies will be stored in ~/.rvm/rubies, and therefore separated from the system. There are a few easy steps to get ...


5

What is a Gemset? I have already created rvm install 1.8.7-head rvm install 1.9.2 With this, you installed two Rubies (not Gemsets), namely versions 1.8.7 and 1.9.2. These are (simply speaking) just two versions of the Ruby interpreter/language. Now, each Ruby version normally has a couple of Gems installed (Rails being one). Think of it as a ...


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

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 ...


5

Sleeping for five minutes is a pretty unstable hack. What if something later in the boot chain takes an unusal long time to start up? And why do you want your system to take longer than necessary to boot? The right way to do it is to make your startup script run after the stuff it depends on. How you do this differs between distros. In Debian you specify ...


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

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 ...


4

The Stop button sends a "Stop service" control to the service's main program – in this case it's srvany. The rest is up to that program. And it appears that srvany will simply ignore the control. It seems that the version of srvany for Windows NT 4.0 does kill its immediate children – you can get it from Microsoft. It is possible to write a ...


4

The new XCode, 4.3, appears to have a Downloads in its preferences that allows you to install the commandline tools.


4

brew remove package_name_here brew cleanup



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