Don't dismiss RVM's value
You can use the repository version of Ruby but I would recommend going another way and using RVM to manage Ruby. I realize it might seem like it's slowing you down, but the version of Ruby that's deployed via the repositories though usable will often lead to problems down the road. It's generally best to create dedicated versions ...
logrotate is used by the system to rotate logs so you have 2 choices. You can either incorporate the rotation of these app logs into the systems rotations or setup your own and either run them manually or from the root user's crontab (Assuming the Rails app is run as root given it's directory is /root/...).
To setup a logrotation within the ...
If you are using RVM then it is just a matter of putting a file named .rvmrc in your project directory with the following content:
rvm use ruby 1.9.x@gemset
For your second project it is the same, just change the rvm invocation.
There should be no difference. Pipe the output through cat -v which will escape non-printable characters.
Perhaps you have some special locale settings, which modifies what -print0 does. At least with my en_US.UTF-8 settings there is no difference. Perhaps add the output of locale to your question.
Possibly your test with ruby causes ruby to interpret the \...
That the remote declined to receive the data is only a side effect of the real problem -- git thinks that it was denied because one of the hooks on the remote end failed with an exit status >0 (you can see what it was in the Ruby traceback). It seems that one of the hooks tries to use rake, and can't find it. This is not a problem with your specific repo, ...
In gVim you can select the font, vim depends on the font the terminal provides. And it's the same for colour support. Gvim has full support, vim depends on the terminal.
Gvim additionally has menus and a toolbar, which vim lacks.
One big advantage of vim is that, since it's a terminal application, you have a full fledged terminal at your fingertips. gVim ...
You need to run the shell as the user, not the curl or the which command.
There are several ways this can be done, including:
sudo -u user bash -c 'curl -L https://get.rvm.io | bash'
curl -L https://get.rvm.io | sudo -u user bash
If you want to do it interactively, you can use sudo's -s option to override the fact that they don't have a valid shell. ...
According to the official docs it sounds like you just need to prefix your scripts like this:
And then do one of the following things to tell rbenv which version of Ruby to use:
Choosing the Ruby Version
When you execute a shim, rbenv determines which Ruby version to use by reading ...
You could try sourcing the new environment files. Looking above, I guess,
# SHELL NEEDS TO BE REFRESHED HERE
plus any other files that have been created, that you need including in the current shell.
You may wish to consider using a ruby package manager like rvm or rbenv
You can install different rubies and switch between them easily.
You might also want to consider trying 2.0+
Sample output from rvm:
21:59:48 durrantm Castle2012 /home/durrantm
$ rvm list
ruby-1.8.7-p374 [ x86_64 ]
ruby-1.9.3-p125 [ x86_64 ]
ruby-1.9.3-p194 [ ...
Aliases can be of use to you. You can create alias for each specific directory and the command you need to run. So for the two example you have given it would be:
alias ticketapp='cd /proj/tickecting_app && rvm use ruby 1.9.x@gemset'
alias feedapp='cd /proj/rss_feed_app && rvm use ruby 2.1.x@gemset'
So next time you only need to give the ...
From the latest version of the kill(2) manpage:
For a process to have permission to send a signal to a process designated
the user must be the super-user, or
the real or saved user ID of the receiving process must match
the real or effective user ID of the sending process.
A single exception is the signal SIGCONT, which may always be ...
The short answer is that you can't.
The idea behind using #!/usr/bin/env ruby instead of simply #!/usr/bin/ruby is to use whatever ruby binary is first in the user's path. Then your script doesn't depend on ruby being in the same place on every system; after all, a 'normal' ruby location might be /usr/bin/ruby, /usr/local/bin/ruby, /opt/ruby-1.8.7/bin/ruby, ...
You're having problems with quoting because you're calling popen with a commandline, which is passed to the shell. Ruby's string parser is either eating the double quotes or eating the backslash. You can either call popen with an array of strings, which will bypass the shell, or you can write emacs foo\\ bar which will escape the backslash that you want ...
I'm not sure if that answers your question, but the pwdx could give you the current working directory of any process.
You could also do what Ulrich Schwarz said and run
ls -l /proc/PID/cwd
I'd recommend that you use rvm to manage Ruby versioning.
First install rvm:
curl -L get.rvm.io | bash -s stable --autolibs=enabled
You'll probably want to source that on shell startup as well, so add it to your ~/.bashrc:
cat >> ~/.bashrc << 'EOF'
[[ -r ~/.rvm/scripts/rvm ]] && . ~/.rvm/scripts/...
It's because creating a giant string and passing it as an argument isn't what "here documents" do. They create a stream, which can be connected to some job's input.
is not equivalent to
Speaking of cat, it can help us out here. Warning: non- useless use of cat follows!
echo $(cat <<!
See, we can ...
if [ -z `cat rvm_check.txt | grep not` ]
if ! grep -q not rvm_check.txt
The reason to use test in an if statement is because it sets an exit code that the shell uses to decide to go to the then or else clause. grep also sets an exit code. Consequently there is no need for test, [, here. grep sets the exit code to success (0), if it ...
Definitely, the bundle-gem online manual was created from the bundle-gem.ronn file. And ronn is a format (and program) meant to be formatted as a man page.
First let's get the files (for bundler-gem and ronn):
git clone https://github.com/bundler/bundler.git
gem install ronn # this actually depends on mustache, rdiscount and hpricot
And create the man ...
Your Tiny Core Linux install probably has a bare-minimum shell installed. This is probably busybox. You can verify this by checking if /bin/sh is symlinked to something else:
ls -l /bin/sh
lrwxrwxrwx 1 root root 7 Dec 15 20:52 /bin/sh -> busybox
Since Tiny Core Linux loads the bare-minimum OS into RAM, this is desirable. However, ...
The closest thing I can see is Capistrano.
from fabric.api import run
fab -H localhost uptime
task :uptime, :hosts => "localhost" do
Can't find the 'libpq-fe.h header
If you haven't done it already, install and initialize apt-file. This tool tells you what package contains a file with the given name.
sudo apt-get install apt-file
Then run apt-file search libpq-fe.h to find out what package contains this file, and install the package in question. (It's libpq-dev.)
You cannot. However, you can trick pacman into thinking you have (there are two ways to do this).
Simply pass the --dbonly option:
pacman -S --dbonly ruby
This will commit the transaction to the database (make a record of the install), but not actually download or install any packages.
If you want, you could also pass --asdeps to mark it as a dependency.
Printing to a console (especially a remote console) is a fairly expensive operation if done in a tight loop that's executed frequently. Most Ruby I/O is blocking, so it will drastically slow down the execution of the program.
You should get a much more reasonable result if you send the output to a file (or /dev/null, if you don't care about it) instead:
It's because you're echoing all the numbers out to the screen via the puts. These then have to be sent over the SSH connection which extends the amount of time the scripts takes to run. The output is also buffered locally but the effects aren't as noticeable.
You can confirm this by dumping all the output to a file instead.
local on laptop to ...