Questions tagged [ruby]
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.
418
questions
1
vote
1
answer
110
views
Ruby Compile error Windows 7 x64
Getting this error when using nmake on Windows7 x64 to compile Ruby 2.2.0
I've never done this before, so I have been following this and this advice:
generating ripper-x64-mswin64_100.def
NMAKE : ...
1
vote
1
answer
3k
views
What to do when "apt-get update" gets stuck in 100%?
I'm setupping a VirtualBox VM to do my development work with Ruby on Rails.
My problem is that apt-get update is taking very long, ~30 minutes instead of seconds.
I can install things with apt-get ...
0
votes
1
answer
933
views
Change default Ruby for all users with rbenv
I installed rbenv in vagrant this way:
apt-get update
apt-get install -y automake bison build-essential git-core libffi-dev libreadline6-dev libgdbm3 libgdbm-dev libncurses5-dev libssl-dev libtool ...
0
votes
1
answer
2k
views
Can't install Ruby 2.2.0 using rbenv
I installed rbenv from GitHub:
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
I’m trying to install Ruby ...
5
votes
1
answer
851
views
Customize "wrap" characters in Sublime Text
In Sublime Text, highlighting any text and pressing any of the following symbols:
'
"
(
{
[
will cause the entire highlighted section(s) to be surrounded by the key you pressed (or its matching ...
0
votes
0
answers
97
views
Ruby RuntimeError on launching terminal (Mac)
Whenever I open the terminal on Mac I get this error:
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: invalid option --1 (-h will show valid options) (RuntimeError)
...
1
vote
1
answer
2k
views
Homebrew error in OS X. Bad interpreter: Too Many levels of symbolic links. Undefined error: 0
I've been searching for an answer to this problem for a few weeks now, and while I've seen similar problems, none that I have found have been exactly like the error I'm experiencing. I've tried ...
1
vote
1
answer
754
views
Force SublimeREPL to use specific version of Ruby
I installed SublimeREPL for use with Ruby. It attempts to run code on Ruby 1.8.7 and I would like it to run on 1.9.3, and later on other versions of Ruby. I'm not sure where it's inheriting the ...
19
votes
5
answers
39k
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 ...
1
vote
1
answer
156
views
NoMethodError with Ruby when installing SoundCloud 2000 client for CLI
I’m trying to install SoundCloud2000 on my MacBook running Mac OS X 10.8.5.
I have Ruby 2.2.0, mpg123, and portaudio installed. Installing SoundCloud 2000 as a GEM seems to work fine:
gem install ...
0
votes
1
answer
131
views
Losing line breaks when pasting code into Nitrous
When pasting a bloc of Ruby code from Atom or the Nitrous text editor into the Nitrous console, all line breaks are lost. Multiple lines of code are concatenated into one long string, separated by a ...
0
votes
0
answers
2k
views
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file -- mysql2) (LoadError)
I am trying to install Redmine on Ubuntu and currently having an error if open Redmine page:
Please install the mysql2 adapter: gem install
activerecord-mysql2-adapter (cannot load such file -- ...
3
votes
4
answers
1k
views
How can I allow files to be dropped onto a Ruby script in Windows Explorer
In Windows Explorer (Win7) I can drop a file onto a batch (.bat) file, and the batch file is executed with the path to the dropped file as the first command line argument. How can I do the same thing ...
1
vote
0
answers
1k
views
Gems installed with the --user-install option into the OS X home folder aren't working properly afterwards.
On previous OS X revisions i had installed my gems with sudo. With Yosemite i wanted to change that and install without sudo. To leave the default gems in
/Library/Ruby/Gems/2.0.0
/System/Library/...
2
votes
2
answers
4k
views
Why does systemd process stop as soon as it starts for foreman server process?
I am trying to export a simple Ruby app using foreman. Based on its usage for systemd, I appear to be doing things correctly.
However, when I start the target/service, I get status messages along the ...
38
votes
4
answers
26k
views
Services that just return your public IP as text [closed]
I'm writing a script that does dynamic DNS updates for me, but my server is behind a router, and so I need to use a web service to determine my public IP.
So far I've found this one which returns ...
3
votes
1
answer
6k
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
1
answer
2k
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: /...
9
votes
1
answer
6k
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 unix:///...
4
votes
1
answer
2k
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.0....
19
votes
2
answers
14k
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
0
answers
293
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
1
answer
284
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 to ...
0
votes
1
answer
737
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 ...
2
votes
1
answer
1k
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
0
answers
195
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 ...
2
votes
2
answers
3k
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 ...
3
votes
2
answers
6k
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 ...
2
votes
1
answer
879
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?
1
vote
0
answers
417
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.
...
2
votes
1
answer
521
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
0
answers
544
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
1
answer
218
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 ...
2
votes
1
answer
619
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 ...
1
vote
0
answers
94
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 ...
0
votes
0
answers
3k
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
0
answers
334
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
1
answer
2k
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.: googlecl....
-2
votes
1
answer
49
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 ...
3
votes
1
answer
2k
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 ...
13
votes
1
answer
6k
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 ...
2
votes
1
answer
231
views
Problems with git and bundler
I'm trying to set up Gitorious on my Server with this tutorial and having problems over problems with gem/git. After fixing a lot of libs and dependancies, bundler now won't work with git repositories....
0
votes
1
answer
4k
views
How to stop ruby on Mac OS X
When I run a faulty ruby loop programme, my CPU start running fast as you can see in the following image. I stop abort it by ctrl C but it keep running. Only I can stop it to restart the computer.
Is ...
-5
votes
2
answers
1k
views
Remove last word from whole string [closed]
I have following string
2014-04-29T06-19-20_17368f93ce02e18f278ae22d248e7d0692db3f54d2409_1088x288.mp4.uploaded
I want to remove the last .uploaded word from this whole string .
How can I do this?
-1
votes
2
answers
67
views
Find particular file in particular directory
I want to find the particular file name in particular directory in ruby.
I tried the following Dir.glob()
file = Dir.glob("/home/prakash/Desktop/*.uploaded")
output:
/home/prakash/Desktop/abc....
0
votes
1
answer
386
views
zsh and Ruby print issue
Has anyone come across an issue where Ruby's print method leaves behind a % at the end of the line using zsh?
I'm using oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) with iTerm2.
Here is an ...
0
votes
1
answer
1k
views
How to run a launchd task every weekend once?
I am trying to run a ruby program as a cron. I have figured out how to run the ruby program from a launchd The problem is that I don't know how to say "Run the job once every Sunday". Below is my ....
2
votes
0
answers
677
views
How can I get Homebrew and MAMP (Pro) to play nicely together?
I am using MAMP Pro for most of my local application development and am trying to install ruby , etc via homebrew however homebrew will give me the following warning:
Warning: "config" scripts exist ...
6
votes
2
answers
9k
views
Why can't I set the default Ruby version in Ubuntu?
I'm trying to set my Ruby version to be 1.9.2, but I can't change it from the system Ruby installation. What am I doing wrong?
My terminal output is:
$ rvm list
rvm rubies
=> ruby-1.9.2-p180 [ ...
0
votes
1
answer
188
views
How do I avoid continual issues with multiple programs (git, ruby, python) and default network drive path problems?
I am not an advanced user.
Windows 7 PC. Our network admin has a network drive (H: drive)that installs on restart.....which I do not have access to when not in the office (or is not available via VPN)...