So I was making a cgi ruby script and had the following at the top of the script file:
#!/usr/bin/env ruby
require 'rubygems'
require 'action_pack'
require 'cgi'
After a couple of hours of not getting "/usr/bin/env: ruby: No such file or directory" error and google searching, I uninstalled my system ruby 1.8.7 (I also had 1.9.3 installed via rvm) by doing sudo apt-get purge ruby rubygems.
Hi,
I am a php developer and I decided to learn ruby on rails.
I have a few question.
I have an ubuntu virtual machine with lamp.
It mean that it has alrweady php and when I access the ip of the machine from my browser it does load the index.php.
if I install ruby on rails will theere be collision between the php and ruby or the server just know that if I ask for ruby file or for php.
which -a ruby gives me
/usr/ruby
/usr/ruby
/usr/ruby
It gives the same path three times. Why does this happen?
About 50% of the time, when I run bundle (or bundle exec foo) I get an error like the following:
> bundle
/usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': No such file or directory - /usr/local/lib/?y (Errno::ENOENT)
from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/
I hope my title isn't confusing. I've got a CentOS 5 machine and I had Ruby 1.8.7 installed on here. So in order to upgrade my Ruby installation and gems/rails I
Uninstalled Ruby: sudo yum remove ruby
Downloaded the latest stable release of ruby and untared it: wget...
Lately there have been a lot of one-liners posted in "ruby" on the apparent assumption that mainstream unix or Linux come with "ruby. They don't.
What is "ruby"?
What platforms and Operating System versions are supported?
The syntax for "ruby" seems remarkably obscure compared with say "awk" or "perl". Is it related to APL?
In an executable file, you specify the environment using a shebang:
#!/usr/bin/env ruby
# ruby code here
But what if you want to specify multiple possible environments?
Im getting that alert (Linode server) every couple of day.
Top shows 110% usage by ruby.
In not doing any script with ruby, but i do use Redmine and SASS on this server, how do i debug this? how i know what is calling ruby?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29368 root 20 0 48440 9648 1616 S 110 1.9 598:18.25 ruby
I'll let the shell log explain itself:
root:~# rvm current
system
root:~# which ruby
/usr/bin/ruby
root:~# rvm use 1.9.2
Using /root/.rvm/gems/ruby-1.9.2-p290
root:~# rvm current
ruby-1.9.2-p290
root:~# which ruby
/root/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
root:~# rvm system
root:~# rvm current
system
root:~# which ruby
/root/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
root:~#
At this point, if rvm cl