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

learn more… | top users | synonyms

-1
votes
0answers
9 views

What's the better tool to convert markdown to slides with code syntax highlight [on hold]

I use the gem slideshow with impress.js them But it can not the syntax highlight. Is there any better and easier tool can let me write markdown then convert to slideshow easier ? I'm familiar with ...
1
vote
1answer
433 views

yaml.h not found after installing libyaml

I have installed libyaml yet Ruby install can not find yaml.h. I do not have sudo permissions so everything must be done as a normal user. wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz ...
0
votes
1answer
35 views

Brew & Ruby no longer functioning properly due to a recursive trap

After updating to OS X 10.10 (Though this might have been irrelevant), I was not able to run any brew commands. Any command gave me this error: /usr/local/bin/brew: /usr/local/Library/brew.rb: ...
4
votes
3answers
548 views

finding geolocation from an ip address

How can I find a location such as city/state or country from an ip address? Is there a ruby gem or python module to do this? Or if there is a website which has an API.
0
votes
1answer
49 views

Why can't nginx access puma socket on CentOS 7?

So I have a Ruby on Rails app in /var/www/ owned by nginx with 755 permissions. Said app is intended to be deployed via puma. Like so: rvmsudo -u nginx bundle exec puma -e production -d -b ...
1
vote
1answer
4k views

How to run bash script from windows using plink on linux

I'm trying to run a simple bat file from windows that will run a bash script on linux machine. The bash script is located on the linux machine. For example: I'm trying to run this bat file from ...
10
votes
5answers
14k views

Is it possible to reinstall/fix Mac OS X's system ruby without doing a complete OS reinstall?

Is it possible? I'm running into various issues at least once a week since it got corrupted or something, especially with homebrew. If it is possible, but would just be a better idea to start from a ...
2
votes
1answer
285 views

All rails application logs being written to apache error log

I've deployed a ruby on rails 4.0.3 application to a server that I've configured with the following likely relevant software: Ubuntu 12.04.4 x64 server Phusion Passenger 4.0.37 Apache 2.2.22 Ruby ...
2
votes
2answers
2k views

How to install and use different versions of ruby?

I'm learning rails from different books that use different versions of both ruby and rails. Right now I have ruby 1.87 installed on my Mac OS X Snow Leopard (in /usr/bin), but need to also use ruby ...
10
votes
2answers
4k views

Ruby installation issues with RVM

I've been following the directions at http://installrails.com to get my Macbook Air setup for some ruby work but I am running in any issue with RVM. When I try to install Ruby I get the following ...
0
votes
0answers
12 views

Unable to Uninstall JRuby on Windows

I'm unable to uninstall JRuby on Windows. When I run the uninstallation program the first time it finishes its work with an error: java.io.IOException: access denied, also it deletes the files.log ...
0
votes
1answer
11 views

How can I disable rvm's interactive help (pager?) i.e. more / less a la `man`?

I recently upgraded from rbenv to the newest version of rvm. If I type a command such as: rvm help Then it gives me the same sort of paging interface I would get with man rvm - but I just want it ...
0
votes
1answer
90 views

CentOS Ruby Install - Open SSL Issue

Attempting to install ruby 2.1.2 on a centos 7 box, but running into a dependency issue with openssl ~ % ruby-install ruby ...blah blah blah... ---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 ...
1
vote
2answers
575 views

Can't vagrant install a plugin: gem dependency fails despite being installed

I am attempting to install the vagrant-vbguest plugin in Windows 7 from within cygwin 64. $ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few ...
2
votes
2answers
2k views

Installing Ruby with RVM in Ubuntu 14.04

I installed RVM using the following command \curl -L https://get.rvm.io | bash -s stable Then I restarted the terminal and executed this commands source ~/.rvm/scripts/rvm rvm requirements rvm ...
2
votes
1answer
752 views

install gem for older ruby 1.8 on Mac OS X 10.9 Maverics

I installed osx-trash using the answer here but got the error: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot ...
0
votes
0answers
29 views

Why does my app run much faster on my laptop than my VPS?

I have a web application with a Ruby backend that does some stuff that is a bit computationally intensive. I develop and test the app on my rMBP with a 2.7GHz i7. I have the app deployed to a Linode ...
1
vote
2answers
700 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 ...
0
votes
0answers
41 views

How to correctly indent multiline ruby method chaining code in emacs?

I wish to have such indentation: some_object.method_1(args) .method_2(args) .method_3(args) While by default ruby-mode will indent the code like: some_object.method_1(args) ...
0
votes
0answers
67 views

OSX: reinstall ONLY Ruby

Problem: Today I brought to life my next excellent idea - remove /System/Library/Frameworks/Ruby.framework folder on my Mac. So now brew is totally broken down: brew doctor /usr/local/bin/brew: ...
0
votes
2answers
35 views

Why is this cronjob not working?

I have a ruby script in ~/custom_scripts/get_all_products.rb. I want it to run every night at 04:00. Here's what the cronjob in crontab -e looks like: MAILTO="<email>" 0 4 * * * ruby ...
3
votes
2answers
905 views

How to install development tools when Ruby compiled from source

I have Windows 8, and I need to install Ruby 2.1.2 for a project. I followed these instructions. I unzipped the source into C:\Ruby2.1.2\src\, ran nmake in C:\Ruby2.1.2\build\, and ran nmake install ...
1
vote
1answer
59 views

Default Mac Ruby Gems?

A Mac always comes with some default ruby gems installed in the local RVM. Is there anyway I can check or view a list of the default ruby gems installed in a Mac OSX Mavericks?
0
votes
0answers
1k views

rvm use responding with Unknown ruby interpreter version (do not know how to handle):

I have a number of Rails apps that I've inherited that use different Ruby versions. To make life easier I'm trying to use rvm. Whenever I fire off the rvm use command inside any of the directories I'm ...
1
vote
0answers
184 views

Ruby error on my Mac

I'm having issues with my Ruby on my iMac (early 2010). I have the preview of Mac OS X Yosemite installed, but I've had these issues like forever, so I can't imagine OS X being the error here. ...
0
votes
0answers
60 views

RubyRep Setup Causes an Error “ Exception caught: Mysql::Error: query: not connected: SHOW TABLES”

I've spent the entire day trying to get RubyRep going on a CentOS machine, and now I'm stuck on the error "Exception caught: Mysql::Error: query: not connected: SHOW TABLES" for which I couldn't find ...
0
votes
0answers
67 views

OpenProject fails to send mails

I installed OpenProject following this guideline. After a day of work it runs. My current problem is, that sending of mails failed silently. I have only the following entry in my log: Started GET ...
2
votes
1answer
37 views

Where did my command (Heroku) go?

I expect to be schooled on this but have exhausted my Google searches and scant knowledge of how OS X finds a command. I've been using heroku for years and for some reason today I get the result: ...
1
vote
0answers
323 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 ...
0
votes
1answer
38 views

Downloading Images through Wget With Proxy

I've written a ruby tool to download multiple images. However, this time I'm having to configure wget with a proxy. Prefix is the specified directory of where I want the images to go and md5_sum is a ...
0
votes
0answers
55 views

Ruby CGI scripts and Apache

I have two legacy legacy Ruby CGI scripts that was developed by someone in 1990. It used to be on a HP-UX server, and years ago, they removed the server. What is left are two Ruby CGI scripts that is ...
1
vote
1answer
2k views

Upgraded to Mavericks, C compiler cannot create executables

Upgrading to Mavericks, I appear to have broken my Ruby on Rails development environment, which requires ruby 1.9.3 because of various gem dependencies. Within that app directory, I'm trying to ...
2
votes
1answer
249 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 ...
0
votes
0answers
29 views

Redmine reports intermittent Internal Error

I've been using Redmine/Apache for a few months now. Occasionally a page will not load, and instead I will get Internal Error 500. Refreshing generally fixes this. When I look in the log file on the ...
1
vote
0answers
28 views

Ruby ri output not coloured in iTerm 2

When I run Ruby ri in an iTerm 2 terminal window, the output is not coloured and I don't know why. Other programs such as Vim work with colour properly. Running ri -f ansi Array.sort results in ...
3
votes
1answer
75 views

How to execute Ruby scripts on Windows 7 with minimal technical effort?

I've written some Ruby scrappers which will be used by some non-technical guys. I want to make these Ruby scripts executable on Windows with minimal effort. What are my options beside installing Ruby? ...
0
votes
0answers
764 views

Removing or Uninstalling Ruby, Rails, and/or Gems from Mac OS X 10.9.4

I had some health issues and was away from my iMac for about 6-8 months. I’m not exactly sure which version of OS X was running when I stopped using it, but I had just installed Rails and was about ...
0
votes
0answers
228 views

Gem: Could not find a valid gem in any repository

my problem is that I installed ruby and gem successfully with no errors, but when I go any further, trying to install any gem, it threw an error: ERROR: Could not find a valid gem '<name>' ...
0
votes
0answers
28 views

ruby/rails with powder not showing website

I've run powder default inside my project directory. Which leads to this page when surfing to http://localhost The application's environment settings are in this gist The project has been ...
0
votes
0answers
59 views

Online service to execute Ruby scripts

I am investigating the possibility to start a backup up server remotely in case the main server fails. The idea is: Amazon Route 53 monitors the main server The server fails, which triggers an alarm ...
0
votes
1answer
196 views

How can I set the terminal encoding when running a crontab job?

I have a crontab job which executes a Ruby script on Arch Linux. It works basically, but when I call "googlecl" to post to my blog, it always shows a "safeDecodeError" exception (eg.: ...
0
votes
3answers
4k 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 ...
1
vote
2answers
3k views

RVM is not a function, selecting rubies with 'rvm use …' will not work

I am trying to install Discourse as explained here but the command # Use installed ruby as default rvm use 2.0.0 --default results in this: discourse@ubuntu:~$ rvm use 2.0.0 --default RVM is ...
0
votes
1answer
65 views

Which version of rails should I install with ruby 2.0.0 installed?

Hi I am building a ROR development environment on a new computer with windows 7, now I have Ruby version 2.0.0 and Gems version 2.2.2 installed. Which version of Rails should I install? I saw ...
0
votes
0answers
75 views

Compass watch exits randomly without output or error

I am using the ruby gem compassto preprocess sass/scss to css. Using compass watch path/to/scss I keep precompiling every time the scss-files are updated. But every now and then, the process simply is ...
-2
votes
1answer
33 views

Typical cases where I might use exceptions in programming [closed]

Can someone please help me with something that seems simple but I've never really got my head round. Exceptions! I know how to write an exception but countless code samples with variables foo and bar ...
9
votes
2answers
11k views

How can I fix a Broken Pipe error?

I recently reinstalled RVM (following the instructions at http://rvm.io) after a fresh install of Ubuntu 12.10 when I got an SSD Drive. Now, when I type: type rvm | head -1 I receive the following ...
0
votes
0answers
50 views

How to define new scopes using arbitrary delimiters in Sublime Text 2

TL;DR: How do I bring Ruby-like comment scope to plaintext files for sublime text? I want to customize my plaintext file look in ST2 by allowing comments. So far I have managed to extend the ...
1
vote
1answer
602 views

Issues compiling passenger for apache2 on CentOS

I am trying to install openproject on a CentOS 6.5 (Release 3 from OVH) following this tutorial but with mysql in place of postgresql. I'm nearly done but I can't seem to compile passenger for apache ...
2
votes
1answer
575 views

bash vi mode: What does # -*- mode: ruby -*- # vi: set ft=ruby : mean?

I'm looking through some random code, and at the top of it, it says this: # -*- mode: ruby -*- # vi: set ft=ruby : What does this mean? I know it's a simple question, but I couldn't find it out ...