irb Questions

2

Solved

I often code with a TextMate window open, and an irb process in a Terminal window adjacent to it. I want to be able to press a key sequence in TextMate which does the following: Copies the curren...
Verada asked 24/12, 2010 at 5:23

2

Solved

I work with rails console and often i need to preload some ruby code to work with. #file that i want to load in rails console #my_file.rb a = 1 b = 2 puts a + b When i run my console with ./scr...
Calmative asked 22/10, 2011 at 14:36

2

Solved

I've seen screencasts where users are running irb and as they write text they jump to the beginning/end of the line and beginning/end of words. What are the keystrokes used to do this? Does it depe...
Erythro asked 20/10, 2011 at 13:28

2

Solved

Regarding the use of Rails console, when I make some change on a model, do I need to reload the rails console every time to make that change reflects? For example, I have my original code as follo...
Mapping asked 20/10, 2011 at 3:13

2

Solved

I have finally started upgrading my Rails apps from 2.3.8 to 3.1.0. I was watching RailsCasts (http://railscasts.com/episodes/202-active-record-queries-in-rails-3) about Active Record queries. Wh...
Lillie asked 4/10, 2011 at 10:2

1

Solved

I'm used to interrogating my rails db via script/console. But in some instances I need to be exceptionally careful about not changing data, so I'd like to be able to open the console in a read-onl...
Jaffa asked 2/9, 2011 at 19:54

2

Solved

I am working on Zed Shaw's Learn Ruby the Hard Way Exercise 25 http://ruby.learncodethehardway.org/ex25.html When I navigate to the directory that holds the ruby file ex25.rb and launch IRB, I ge...
Goran asked 29/8, 2011 at 9:24

3

Solved

One thing I miss about ipython is it has a ? operator which diggs up the docs for a particular function. I know ruby has a similar command line tool but it is extremely inconvenient to call it whi...
Xanthophyll asked 12/8, 2011 at 6:18

1

Solved

I'm pretty new to ruby and I'm currently reading the Pickaxe book to get familiar with everything. I came across the File.open section where it discusses taking a block as a parameter to a File.ope...
Kori asked 26/7, 2011 at 17:12

3

Solved

I'm using Terminal on Snow Leopard. At the command line, if I've typed foo.bar.baz.bang.quuz.quux, when i tap option-B, it moves the cursor backward word by word -- stopping at every period, becau...
Narcose asked 23/2, 2011 at 22:17

1

Solved

I am trying to load a file into IRB. I have the file saved on my desktop titled "Ruby.rb" How do i load the file into IRB? I have tried using both, 'load "Ruby.rb"', 'load "Ruby"' and 'require "R...
irb
Rectrix asked 20/6, 2011 at 8:25

3

Solved

I am using delayed_jobs to run Ruby classes, how can the Ruby detect the name (command) of the process that is running it? any thoughts?
Rosemaria asked 26/5, 2011 at 16:10

2

Solved

I've noticed a side effect in Ruby/Oniguruma that is only present in 1 out of 4 seemingly equivalent statements. Why is the variable day defined in 009, but not in 003, 005 or 007? irb(main):001:0...
Eclogue asked 25/5, 2011 at 12:32

1

Solved

Wnen you use irb with auto indent mode, the end statements get indented one level extra def foo ... end instead of showing the ordinary indenting convention: def foo ... end because you c...
Nitza asked 20/5, 2011 at 23:35

2

Solved

I searched the other posts that had this issue and could not find one that fixed my particular issue. My irb is going crazy. I am trying to change user roles in my database but I can't even get to ...
Preengage asked 12/5, 2011 at 16:23

3

I want to enter German Umlauts in my irb but get a weird error. I can enter any character of äöü without problems, but each of ÄÖÜß leads to the following error: $ irb ruby-1.9.2-p136 :001 > ? ...
Nichani asked 13/2, 2011 at 15:13

2

Solved

IRb is pretty plain compared to bpython, even when using wirble. Is there any ruby equivalent of bpython?
Microampere asked 1/6, 2010 at 19:45

3

Solved

I've this script right now. def r(this) require this puts "#{this} is now loaded." rescue LoadError puts "The gem '#{this}' is missing." puts "Should I install it? [y/n]" data = gets if data...
Santiago asked 27/4, 2011 at 15:57

3

Solved

When I go into irb and type in a command that does not exist I get an error stating "undefined local variable or method 'my_method' for main:Object (NameError)" Is there a way to just get a list...
Rhiana asked 25/4, 2011 at 3:40

3

Solved

guys. I am developing a Chinese application with rails. Now I want to input some Chinese characters in rails console but cannot do that, either in irb. Any guys who have the experience to solve t...
Kaylakayle asked 4/1, 2011 at 4:47

3

Solved

Is there any reason why my present working directory is not on my Ruby path? Consider: ~:499$ irb ruby-1.9.2-p136 :002 > puts $: /Users/mrberryman/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/si...
Underground asked 11/2, 2011 at 4:12

1

Solved

I want to use IRB to run a script then give me an interactive prompt. I do this with python -i xy.py in Python, however irb xy.rb exits after execution. > python --help -i When a script is pas...
Slothful asked 22/1, 2011 at 11:39

2

Solved

I'm trying to include a source code file when I run irb but irb is unable to find it. For example, say I am in the following directory in terminal: /dan/rubyapp/ Assume I have a file named "fir...
Gans asked 21/9, 2010 at 10:0

4

Solved

I am writing a Ruby script for use in the Rails environment, but I chose to run it from irb because reloading the Rails console can be a pain. Now the wait time is much shorter from irb, but I'm bo...
Skinny asked 8/1, 2011 at 2:55

4

I'm from Ruby background. Just wanted to know if there is anything like Ruby's irb in perl?
Ricciardi asked 8/12, 2010 at 15:31

© 2022 - 2024 — McMap. All rights reserved.