Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.

learn more… | top users | synonyms

0
votes
0answers
126 views

Cursor keys leave insert mode in irb in vi mode

I am using vi-mode in a ruby IRB by having a ~/.inputrc containing only the following line: set editing-mode vi Since I changed from ruby 1.8.7-p371 to ruby 1.9.3 and 2.0.0, IRB (and the rails ...
1
vote
0answers
211 views

I am having trouble using SASS/Compass on localhost in Fedora 18

I am attempting to use SASS/Compass in Fedora 18 on my localhost test server, located at: /var/www/html Ruby/gems and compass have already been installed. Now, I'm trying to create a test file and ...
0
votes
0answers
816 views

Launchd Exited with code: 1

I have been spending way too much time trying to figure this one out. My launchd job keeps giving me the error "Exited with code: 1". Here is the plist: <?xml version="1.0" encoding="UTF-8" ...
-1
votes
1answer
246 views

How to use each in rails to display values of an array [closed]

I have a @keyword variable which holds the string "cat dog mouse bird" I want to display the values of each word under a span element. My algorithm looks like <%= @keyword.split.each {|key| ...
0
votes
2answers
61 views

How can 2 or more instances of the same program to communicate in local network? [closed]

I want to create program which will be in use for few computers connected in local network. Basically the program aim is to keep track of all tables in a bar ( lets say ), which are reserved. When ...
0
votes
3answers
5k views

Can't run compass after install

This is a beginner mistake I am sure as I am new to terminal etc. I am trying to get compass working on my mac, I have already installed sass and got it working but when I try to install compass even ...
2
votes
3answers
753 views

Change Command Prompt width from the Command Line [duplicate]

Don't really know what more I can say really. That window captured below will simply not get any larger. Are there some settings somewhere that will allow me to resize it? See, this limited window ...
1
vote
2answers
944 views

Can't install gems with Ruby: “invalid byte sequence in UTF-8”

I'm using Mountain Lion. I've installed Ruby first with RVM, then with rbenv. I can assure it's running the latest one with which ruby, it correctly points to the one installed with rbenv. gem won't ...
1
vote
0answers
19 views

Storing web-development libraries locally and update them whenever you are connected to internet

I'm learning things on the web and pretty much have developed several websites. Internet in our country is a bit poor and slow so developing using ruby or node js is pretty much a pain in the ass ...
0
votes
2answers
287 views

How can I format Ruby arguments/hashes in Vim?

I'd like to be able to easily formatting Ruby code from within Vim. If I have a method with a hash argument foobar(foo: "FOO", bar: "BAR") How can I turn it into foobar( foo: "FOO", bar: ...
2
votes
1answer
478 views

Created box with vagrant as root, want to run as normal user

I ran vagrant init/up as root initially with one of my boxes, however, all of my other boxes are owned by a normal user, so every time I want to use the box as a regular user, I have to sudo and then ...
2
votes
0answers
264 views

`brew doctor` shows warning: “config” scripts exist outside your system or Homebrew directories

When I use brew doctor, I get following error. Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if ...
1
vote
1answer
613 views

Unable to install ruby on ubuntu 12.04

Hi i want to install ruby on my Ubuntu 12.04. I tried it with following command sudo apt-get install curl but it gives me following error. The hostname -f command returned: $1 Your system needs to ...
0
votes
1answer
342 views

How can I programmatically register a file with Redmine?

I'd like to add a file to a Redmine server without going through the graphical interface. I'm making the files available to the Redmine server by a separate svn checkout process, so I just need to be ...
1
vote
0answers
217 views

I am getting this error “Insecure world writable dir /Volumes/BOOTCAMP in path, mode 040777”

I tried the answer sudo chmod go-w in my /Volumes/BOOTCAMP but I'm still getting the warning It says Insecure world writable dir /Volumes/BOOTCAMP in PATH, mode 040777 and when I echo $PATH I get ...
0
votes
1answer
83 views

Why does apt-get dist-upgrade change /usr/bin/ruby to /etc/alternatives/ruby?

When I run an apt-get update, apt-get dist-upgrade, the location of /usr/bin/ruby changes from /usr/local/bin/ruby to /etc/alternatives/ruby. This ends up breaking several cron jobs until I remember ...
17
votes
2answers
2k views

Is there a git-like file system?

Git stores content uniquely in its repo based on the calculated hash of any file. Thus, if my directory has two copies of the same file somewhere inside it, git will only actually store it once. I ...
1
vote
1answer
366 views

How can I pipe the output of *all* entered shell commands into another? (e.g. pipe everything into 'lolcat')

Good Afternoon, (OS X user) I am specifically trying to pipe the output of every shell command I type into the ruby gem 'lolcat' (which makes the output to the terminal rainbow colored). Is there a ...
0
votes
1answer
70 views

OSX 10.8.4 RVM install troubles with Network Users

I'm trying to install ruby 1.9 as the system default for all users of our mac machines. I've installed RVM using a "local" user account and everything seems to be working fine. I'm able to run the ...
0
votes
0answers
75 views

Can gitlab be installed with Cherokee web server?

I've looked all over and can't figure out you could use Cherokee instead of Apache or Nginx for gitlab. I'd rather not run multiple webservers (and imagine that they could conflict anyway). I'm giving ...
6
votes
2answers
5k views

Install rails on Mac OS X

I try to install Rails on Mac OS X. I already installed ruby. $ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2] I check whether Rails is installed: $ rails -v Rails is ...
1
vote
2answers
306 views

How to add a linux environment variable for different language (PHP or RUBY)

I would like to add a linux environment variable for my differents applications written in PHP and Ruby. Its goal is to differntiate between 'production' and 'development' linux environment. How to ...
2
votes
1answer
276 views

Can I install some ruby gem on a standard OS X user?

I have a Admin user for serious stuff and a Standard user for daily tasks, including front-end development. On the Admin user, I can install Brew, RVM, Middleman etc. But on the Stardard user, where I ...
2
votes
1answer
2k views

How do I use Sublime Text as the OS editor in Mac OS X?

How do I set Sublime Text as the editor for git commits in Mac OS X? In my .zshrc I have: export EDITOR='subl -w' But, if I do: bundle open devise I get the error: Could not run 'subl -w ...
1
vote
2answers
825 views

Installing Vagrant alongside RVM isntalled Ruby

How do I install vagrant alongside a specific version of ruby installed using RVM? I have both 1.8.7 and 1.9.3p429 installed. After using RVM to set my default to 1.9.3 I no longer have vagrant ...
0
votes
2answers
645 views

Why do I get a permission error installing Ruby 1.9.3 with RVM?

I need to install a newer version of Ruby than 1.8.7. I already managed to install Homebrew and RVM, but this is what happens when I try to install Ruby. aldaman:~ Alex$ rvm install 1.9.3 mkdir: ...
0
votes
1answer
67 views

Ruby and RVM: Unexpected version number

I am using osx 10.8.4 and has brew installed. I followed the ruby/rvm installation instruction here: http://octopress.org/docs/setup/rvm/ rvm install 1.9.3 rvm use 1.9.3 rvm rubygems latest It ran ...
1
vote
0answers
48 views

Is Textmate like Ruby Markers “#=>” in notepad++ available?

I use Notepad++ to write Ruby code. Now sometimes to test some Ruby features I used to go IRB to see how that works. Can I get the same flavor in Notepad++ itself,like Textmate editor as below? x = ...
1
vote
0answers
203 views

Use Ruby with no-root user in Gentoo

I am just started to update my Gitlab on Gentoo server (4.2 > 5.0). For new version Gitlab need to use Ruby with user 'git'. # check ruby version for git user ( 1.9 required!! ) # gitlab shell ...
1
vote
0answers
217 views

How do I run WEBrick as an upstart job?

I need to get WEBrick (basically a Rails web server) to work using upstart, but cannot figure out what should I write in script. The following gives me an error: chdir /rails-app exec su -s /bin/sh ...
1
vote
1answer
97 views

Define extra `$PATH` for either Passenger or nginx

I have a server with nginx and Passenger serving a Ruby on Rails app. It uses Bundler. Somewhere in this stack, the $PATH gets set to /var/www/APPNAME/shared/bundle/ruby/1.8/bin/. This directory ...
1
vote
1answer
284 views

Can't run 'rails' inside Tmux session in Terminal

I just tried rails inside a tmux session in iTerm2 and it returns as -bash: /usr/bin/rails: /usr/bin/ruby: bad interpreter: No such file or directory I can run rails outside of tmux . I am using ...
0
votes
1answer
609 views

Forward port from guest to host

How can I forward port from Guest (OS on virtual box) to Host (my actual machine)? Guest - Windows 7 Host - Ubuntu 12.10 On my host, I run a web-server on port 3000. I want to be able to open a ...
1
vote
2answers
809 views

when trying to install the watir or watir-webdriver gem on Windows 7 via cygwin, getting long C stack trace with mentions of “W32 socket” issues

When running: $ gem install watir on Windows 7 (cygwin), I get this ERROR: Error installing watir: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb checking for ffi.h... ...
0
votes
1answer
204 views

Uninstalled Ruby.Frameworks on Mac OS X 10.8

In an attempt to create a clean Ruby slate for myself, I uninstalled RVM, rbenv (yeah, I had both installed, whoops), Gem, Bundler, and the pre-installed version of Ruby. I didn't realize the chaos ...
0
votes
3answers
1k views

How can I run a Ruby project found on Github?

I want to run a project from github. Here is the link. I used following command to download the project and it done successfully. $ git clone git://github.com/cheeyeo/Amazon-SNS-Ruby.git But I ...
0
votes
1answer
825 views

How I get rvm to work properly with gnome-terminal?

How do you get rvm to play properly with gnome-terminal? wim@wim-desktop:~$ rvm list rvm rubies =* ruby-1.9.3-p392 [ x86_64 ] ruby-2.0.0-p0 [ x86_64 ] # => - current # =* - current ...
-1
votes
1answer
59 views

Do not know what program to open a Sublime 2 file with

I have a Windows and I'm using Ruby 1.9.1-p429, and it won't allow me to view my test.rb file on cmd when i type cd. I'll go through step-by-step of what I did. I saved a test .rb file on Sublime to ...
0
votes
0answers
240 views

Name of Rake task in ps output?

pid = `ps -ef | grep -v grep | grep rake | awk '{print $2}'` This is a bunch of ruby code that executes piped linux commands. While I usually just use ps aux, just because, I noticed that the rake ...
0
votes
1answer
88 views

last object returned in chrome dev tools / python / irb /

In matlab one could type in the following and get the following reply: matlab> 1+1 ans = 2 One could then all the last returned object by simply typing: matlab> ans ans = 2 That is, ...
1
vote
0answers
403 views

Remove all Ruby from Ubuntu

I'm trying to start a new project with RadiantCMS, but I'm having lots of problems , because in the server are 2 different Ruby Installations. the First one , was installed following the next tut: ...
2
votes
1answer
117 views

Installing ruby19 with +nosuffix still leaves the suffix

Following the advice found in many places, I tried to install Ruby 1.9 without a suffix using this command: sudo port install ruby19 +nosuffix This still leaves the suffix "1.9" on the binary; ...
3
votes
1answer
473 views

Sudo <any command> throws: Command not found but works without sudo

I'm on a CentOS VPS and using RVM and Capistrano to deploy. for some deployments I need to use sudo, but when I deploy with something like: desc "Restart the application services" task :restart, ...
5
votes
3answers
6k views

~/.profile is not loaded when using SSH (Ubuntu)

Edited to reflect the problem I really wanted to solve: I need to set up my ruby environment so I can deploy via Capistrano. export PATH=$HOME/.rbenv/bin:$PATH eval "$(rbenv init -)" I put these ...
0
votes
1answer
139 views

Fix bash_profile to Develop Ruby on Rails Apps

I just installed Ruby and Rails stuff on my machine, and start to learn. But every time I close the Terminal and re-open it, I have to re-type the command . ~/.bash_profile in order to run Rails ...
1
vote
3answers
11k views

Why does the command window always disappear right away on Windows 7?

I hope I am missing something blindingly obvious here, but I can't get things I run from the command window to stay open. That is, 1. I open a new command prompt (windows key + r) + "cmd" 2. I try ...
7
votes
3answers
939 views

Installing Homebrew packages without linking

I'd like to install several versions of Ruby (or really any Homebrew package) without linking any of them. Basically, I'd like to treat any formula as keg-only. I can't seem to find a way to do this, ...
2
votes
0answers
307 views

How do I install sass on centos 5.9 with ruby 1.8.7?

I have CentOS 5.9 on an x86_64. I've installed ruby 1.8.7. Whenever I try to install sass I get an Error saying sass requires Ruby version >= 1.8.7. but that's what I have installed. This is the ...
1
vote
0answers
368 views

No Ruby icon on '.rb' files after Ruby installation with RailsInstaller on Win XP. How to associate?

At first time I installed Ruby using RubyInstaller for Windows. And in the process of installation there was a checkbox whether I want to have .rb files to be Ruby files. If I agree all the .rb files ...
2
votes
1answer
232 views

How to make Notepad++ autocomplete with “end” word in Ruby?

Is it possible to set the Notepad++ that it would automaticly put end after I print class instruction: class MyClass // right after I print the first whitespace after 'class' instruction... end // ...