Questions tagged [ruby]
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.
418
questions
2
votes
2
answers
2k
views
Windows 7 CLI not recognizing commands without specifying extension
I've apparently gone and mucked up my system in a strange way. Windows 7's cmd prompt is no longer recognizing any executable or batch files unless I explicitly type their extension.
C:\Users\Current&...
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 ...
1
vote
2
answers
5k
views
Reinstall Ruby framework on OS X Yosemite
I installed home brew on Yosemite and it messed up the System built-in framework. I couldn't use the Ruby gems already installed or the new ones installed after Homebrew. Instead of fixing all the ...
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 -- ...
0
votes
1
answer
1k
views
RVM wants me to edit PATH in .bash_profile - I fear it is a mess
I am trying to get an Omega sub-theme running on my local machine (OSX 10.10) with Acquia Desktop Dev. Trying to run isolated ruby in sub-theme directory. When I use rvm list I get:
Warning! PATH is ...
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 ...
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:///...
0
votes
0
answers
292
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
273
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 ...
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
1
answer
736
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 ...
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
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 ~/...
2
votes
1
answer
873
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.
...
6
votes
3
answers
8k
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 minutes....
2
votes
1
answer
516
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:
/...
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 ...
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 ...
7
votes
3
answers
9k
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 ...
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 ...
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
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
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....
0
votes
1
answer
2k
views
Which version of rails should I install with ruby 2.0.0 installed?
Hi I am building a ROR development environment on a windows 7,
I have Ruby version 2.0.0 and Gems version 2.2.2 installed. Which version of Rails should I install?
I saw this on rubyonrails.org/...
-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 ...
2
votes
1
answer
5k
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 ...
1
vote
1
answer
2k
views
OS X `gollum` install not working
I've tried many things to fix this, but i can't get get gollum as a cli utility.
gem install gollum
completes with ...
Building native extensions. This could take a while...
ERROR: Error ...
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
382
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
4
answers
2k
views
Bootstrap - Jekyll: Forbidden - no access permission to `/'
I'm doing a tutorial on Twitter Bootstrap and apparently I need to install Jekyll for this. I've followed the installation procedure, but now I'm stuck getting Jekyll to work. In the terminal (Ubuntu ...
2
votes
0
answers
676
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 ...
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 ...
0
votes
1
answer
1k
views
What should I make out of this message?
I am trying to set up the Ruby on Rails on my Mac OS X Maverick just to check whether I have Rails installed I typed
rails --version
and I got this as response
/System/Library/Frameworks/Ruby....
0
votes
1
answer
78
views
how to jump to table in rubymine 6/intellji rails model dependency diagram
I remember there was a keyboard shortcut we used back in the day.. any ideas? or at least what's the name of the action so that i can assign a custom keyboard shortcut in the rubymine key map ...
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....
0
votes
1
answer
263
views
ruby1.9.3 links to ruby1.9.1 in Debian Wheezy after install with aptitude
I have just attempted to install ruby1.9.3 with aptitude but for some odd reason it keeps symlinking /usr/bin/ruby1.9.3 to /usr/bin/ruby1.9.1.
Here are the ruby version in /usr/bin:
lrwxrwxrwx 1 ...
1
vote
1
answer
971
views
OS X Automator Shell Script for custom search with special character not encoded with utf-8
I find a script here
Mac OS X (Lion) Chrome: shortcut for "Search With Google"
which shows how to do google search using shell script in OS X Automator.
The original script is:
open "...
5
votes
2
answers
860
views
Ruby commands are turning off tty echo
After running Ruby scripts, almost 100% of the time, the bash command line will appear to be inactive, while in fact it's silently accepting my keystrokes without showing them to me.
This has ...
1
vote
1
answer
390
views
how to run ruby app on startup
I'm trying to run a sinatra app on startup in linux mint. I'm using the startup applications preferences to add the path to the ruby file that I'm trying to execute:
shotgun /path/to/file/file.rb
...
0
votes
0
answers
227
views
Pow server - my site need port number for .dev
there, I am new to Ruby and trying to use Pow in my Mac.
When I type MYSITE.dev/ in my browser, it always says "The connection was reset". But it works fine for MYSITE.dev:20559. It seems that I can'...
2
votes
1
answer
425
views
Redmine install on Apache2/Ubuntu 12.04 EC2 instance
Can someone point me to a guide or guides that explain how to get Redmine running on Ubuntu 12.04? From installing Ruby to setting up Passenger? I've tried a handful of times and have never been ...