Ruby Enumerable and Yield usage

stackoverflow.com - 2013-03-28 11:26:53 - Similar - Report/Block

Sorry in advance if I am not asking my question in the correct way. Trying to get this bit of Ruby code to work. What I don't understand is how to make the click do at the bottom call the yield functions (it's a traffic light) so that a click will cycle through the yield options. The true, false, false will mean the light is red because i...

Efficient graph traversal with LINQ - eliminating recursion

stackoverflow.com - 2012-04-20 22:31:15 - Similar - Report/Block

Today I was going to implement a method to traverse an arbitrarily deep graph and flatten it into a single enumerable. Instead, I did a little searching first and found this: public static IEnumerable<T> Traverse<T>(this IEnumerable<T> enumerable, Func<T, IEnumerable<T>> recursivePropertySelector) { foreac...

How do you get the class of an underlying object in a Ruby enumerable?

stackoverflow.com - 2012-03-08 00:47:47 - Similar - Report/Block

a = [4, 5, 3] e = a.each e.class #=> Enumerator e.first.class #=> Fixnum How do you find out if e is an enumerator for an array, hash or other type? Working in Ruby 1.9.2...

Ruby 1.8.7 upgrade to ruby 1.9.2

stackoverflow.com - 2012-06-24 12:55:44 - Similar - Report/Block

I am going through the tutorial on http://ruby.railstutorial.org/ , but I already had ruby 1.8.7 installed. I need to have 1.9.2/1.9.3 version. I started to use rvm. $ rvm list rubies rvm rubies ruby-1.8.7-p358 [ x86_64 ] ruby-1.9.2-p318 [ x86_64 ] =* ruby-1.9.2-p320 [ x86_64 ] ruby-1.9.3-p194 [ x86_64 ] # => - current # =* - curren...

Ruby String operations on HUGE String

stackoverflow.com - 2013-05-08 11:34:40 - Similar - Report/Block

I have a string that is ~10 GB in size (huge RAM usage ofc..). The thing is, I need to perform string operations like gsub and split on it. I noticed that Ruby will just "stop working" at some point (without yielding any errors though). Example: str = HUGE_STRING_10_GB # I will try to split the string using .split: str.split("\r\n") # but...

Installing vim with ruby support (+ruby)

stackoverflow.com - 2010-09-25 20:03:18 - Similar - Report/Block

I'm trying to get command-t installed for vim but my current version of vim doesn't have the (+ruby) flag. The command "which ruby" shows that ruby is installed. What do I need to do in order to activate the +ruby flag in vim? Also, what does the +ruby flag technically mean?...

Using bundler with path specified ruby version

stackoverflow.com - 2012-07-10 03:12:17 - Similar - Report/Block

I am on a VM (Lucid 64b) with a system ruby version of ruby 1.9.3p0 I have a ruby script that creates a .deb file -- The script needs to use ruby 1.8.7 which I have installed in /foo/ruby/1.8.7 There is an existing Gemfile to be used with bundler I can't use RVM and I can't install the gems at the system level My .bashrc includes (and has...

Data Usage Question?

droidforums.net - 2013-02-08 02:30:29 - Similar - Report/Block

i just got a Droid RAZR. i was kicked off of my unlimited data to 2GB so now i am stingy with my usage. i went to the settings in my phone and clicked Data Usage. it says i have used 20MB so day (its only been 2 days since iv had the phone). so i went and check on my Data Usage through Verizon. it says iv used 11MB. does the Data usage in...

Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

stackoverflow.com - 2012-04-05 11:37:51 - Similar - Report/Block

I am using Ruby 1.8.7 and Rails 2.3.5 version . When I try to start the server it throws the below error. When I list the gem its shows the rake there but of different version actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) bundler (1.1.3) fattr (2.2.1) git (1.2.5) postgres-pr (0.6...

Why is my production environment pulling in development gems in Rails?

stackoverflow.com - 2012-03-06 07:42:59 - Similar - Report/Block

I'm not sure why this is happening, any clue??? $ echo $RAILS_ENV production $ bundle | grep debug Using ruby-debug-base19 (0.11.25) Using ruby-debug-base19x (0.11.29) Using ruby-debug19 (0.11.6) $ gem list | grep debug ruby-debug-base19 (0.11.25) ruby-debug-base19x (0.11.29) ruby-debug19 (0.11.6) Gemfile: group :development do gem "m...

ruby version and rvm

stackoverflow.com - 2013-03-21 15:55:41 - Similar - Report/Block

I installed ruby 1.9.3 by means of rvm. But in case of errors, I've got messages of the following form /home/railstest/vendor/bundle/ruby/1.9.1 /gems/activerecord-3.1.0 /lib/active_record/base.rb:1082:in `method_missing': undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class (NoMethodError) The question is: what this 1...

Ruby CSV.parse very picky when encountering quotes

stackoverflow.com - 2012-04-01 17:55:21 - Similar - Report/Block

I am finding the CSV parsing in Ruby 1.9.3 to be remarkably fragile. So much so that I am wondering if I am doing something wrong If I do the following in irb I get an error: 1.9.3-p125 :011 > require 'csv' => true 1.9.3-p125 :012 > a = 'one,two,three, "four, five",six' => "one,two,three, \"four, five\",six" 1.9.3-p125 :013...

evolveStar Join

Cellular Data Usage Counter?

modmyi.com - 2013-06-08 21:54:29 - Similar - Report/Block

I'd like to track cellular data usage. I tried Onavo Count but found it buggy: it included WiFi usage and seemed to slow traffic. Since I have a jailbroken iPhone I searched in Cydia and found some: Usage, iNetUsage, Data Usage SBSettings, Data Usage Monitor, Data Counter, and WeeTrackData. Most require purchase, I don't mind that but don...

Rails 3: Ruby 1.9.2: does it need /usr/bin/ruby1.8?

stackoverflow.com - 2010-12-16 20:19:28 - Similar - Report/Block

I am trying to get the Rails tutorial by Michael Hartl going. I spent a lot of time fighting various libraries. So I removed all ruby software from my Ubuntu 10.4 system. Then I installed Ruby 1.9.2. $ ruby -v ruby 1.9.2dev (2010-07-02) [i486-linux] So far so good. Then I did sudo gem install rails After a long time, it finished the i...

I need tool to find usage and unused javascript file in my project

stackoverflow.com - 2013-04-24 12:01:14 - Similar - Report/Block

I my project i am using few third party javascript library.But few are very huge in size.So i want to find out the usage of each javascript file usage in my application (in other words , where and all i used this js fil in my application). If any one suggest this tool will be help full. Thanks in advance. Sathish V J...

Setting server's system ruby version

stackoverflow.com - 2012-05-07 00:34:50 - Similar - Report/Block

In my server, when I run ruby -v I get:} ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] but when I run sudo ruby -v I get ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] I have tried setting the alternatives as suggested , but I just got an error message. I have also tried the default option with rvm , but didn't work eithe...

Huge memory leak / bloat after Upgrading from Rails 3.0 to Rails 3.2 (Ruby 1.9.3 + Passenger)

stackoverflow.com - 2012-02-29 14:32:09 - Similar - Report/Block

last week we've upgraded a small project which was running on Rails 3.0.1 before to Rails 3.2.2. Shortly after the upgrade we recognized that occasionally (2-3 times a day) we've seen a huge Phusion Passenger process ( 1-5 GB!). We're running Phusion Passenger 3.0.11 and Ruby 1.9.3-p0. We already tried different Ruby version (1.9.2-p290 a...

A look at our Ruby setup

webfaction.com - 2012-11-08 17:08:28 - Similar - Report/Block

It’s been a while since the last installment in our series of in-depth looks at the setup on WebFaction servers, so today we thought we’d take a close look at Ruby. Ruby has become a popular choice for web development and we’re pleased to support this powerful, dynamic open-source language. To start off, let’s do a quick mic check with R...

How can I pass variables between ruby scripts?

stackoverflow.com - 2012-05-03 13:29:39 - Similar - Report/Block

I am mostly interested in the theory of this than an actual code solution. How can I have one main ruby script invoking other scripts and sharing variables between each other? I am a bit confused.. Do I need to use environmental vars, session vars, methods, models, controllers, what is the best way to do it!!? Thank you in advance for you...

Simple Class - Is it a Memory Leak?

stackoverflow.com - 2012-06-08 12:50:35 - Similar - Report/Block

I've a very simple class which has one integer variable. I just print the value of variable 'i' to the screen and increment it, and make the thread sleep for 1 second. When I run a profiler against this method, the memory usage increases slowly even though I'm not creating any new variables. After executing this code for around 16 hours,...

/usr/bin/ruby vs. rvm

stackoverflow.com - 2012-03-22 23:38:01 - Similar - Report/Block

After going through the effort of finally purging distro ruby packages from my Ubuntu development sandbox to replace with the highly recommended rvm, I must be misunderstanding something fundamental: I don't want to have to change all the shebang lines in all my .rb source files from #!/usr/bin/ruby /usr/local/rvm/bin/ruby nor anything...

Ruby , Gems -Getting started

stackoverflow.com - 2013-04-09 16:47:55 - Similar - Report/Block

I have just started learning ruby . There are few things I am quite confuse with in ruby as I used to work with Perl and C. 1) How to add external library like "Mechanize" to use with your script? 2) Best free source to learn ruby development like What is gem , bundle and creation of Gem.

require lib in RSpec with Ruby 1.9.2 brings "no such file to load"

stackoverflow.com - 2012-07-07 18:24:16 - Similar - Report/Block

I am trying to upgrade one of my Rails projects to Ruby 1.9.2 . All went pretty well, but one RSpec test broke. In this test I require a Ruby # file spec/models/my_lib_spec.rb require 'spec_helper' require 'lib/services/my_lib' describe "MyLib" do it "should do something" do The lib looks like this: # file lib/services/my_lib.rb class M...

ruby-debug-base19-0.11.26.gem on WIN x64

stackoverflow.com - 2012-05-07 03:54:42 - Similar - Report/Block

Info about my system: ruby -v ruby 1.9.3p125 (2012-02-16) [i386-mingw32] gem -v 1.8.24 when i'm running bundle install output: Fetching source index for http://rubygems.org/ Could not find ruby-debug-base19-0.11.26 in any of the sources the firewall is OFF I downloaded this file: ruby-debug-base19-0.11.26.gem but when i run: gem install...

Websockets versus GCM under Android: battery usage?

stackoverflow.com - 2013-03-25 14:36:53 - Similar - Report/Block

I need to maintain an open, two-way communication channel between an Android app and an external server. I know that I can use GCM for this, but for various reasons that don't pertain to Android, itself, I would like to use websockets, if at all possible. Can anyone point me to a comparison of resource/battery usage stats when using GCM v...

Ruby coder Pro needed. by bradleysnider

freelancer.co.uk - 2012-09-11 08:43:41 - Similar - Report/Block

Need help on scraping data into ruby on rails. Need to design existing PSD into Rails by real rails coder. Please if you do not work on rails dont pretend to. I need someone that is as good as me not someone... (Budget: $250-$750 USD, Jobs: AJAX, HTML, PHP, Ruby & Ruby on Rails)...

Cron, Ruby and watir-webdriver issue

stackoverflow.com - 2012-05-28 16:00:02 - Similar - Report/Block

i have simple ruby+watir-webdriver example: #!/usr/bin/env ruby require "rubygems" require 'watir-webdriver' browser = Watir::Browser.new # do something browser.close when i run this file manually with: /path/to/my/ruby/example.rb it works fine. When i put this in cronjob, doesnt work...i've changed the cronjob to ruby /path/to/my/ruby/ex...

One-click installers: Ruby

webfaction.com - 2013-05-30 17:31:47 - Similar - Report/Block

For our second post taking a closer look at the one-click installers available with the WebFaction control panel, it’s time to look at running Ruby applications. For Ruby developers, we have two key installers: Ruby on Rails and Passenger. Ruby on Rails Ruby on Rails , commonly known as just Rails, is the dominant web application framewor...

Is there anything like Enumerable.Range(x,y) in Java?

stackoverflow.com - 2010-06-01 16:01:57 - Similar - Report/Block

Is there something like C#/.NET's IEnumerable<int> range = Enumerable.Range(0, 100); //.NET in Java?...

how to write a ruby script running on different system

stackoverflow.com - 2012-05-06 13:53:52 - Similar - Report/Block

I have a ruby script, which declare the ruby path in the first line #! /usr/bin/ruby But, I need it to be run in different system. And the path of Ruby are different in different system. How to handle this issue?...

nil can't be coerced into Fixnum Error

stackoverflow.com - 2012-02-23 06:04:10 - Similar - Report/Block

I'm banging my head over a piece of code after upgrading to Ruby 1.9.3. It works fine in Ruby 1.8.7. The code greps a process and fetches the "rsize" value for that process, stores it in a file and then plots a graph. But in ruby 1.9.3 I keep getting this error: ERROR TypeError: nil can't be coerced into Fixnum SVG/Graph/Graph.rb:375:in...

Internet Data Usage Pro for Android

androidzoom.com - 2013-02-27 14:45:13 - Similar - Report/Block

Photogram Internet data usage: - Check Internet usage per month - Check data sent and received - Monitor internet usage - Find device information - Battery level indicator - Internet usage time - Video playback time - Audio playback time - Set notification... $0.99

Character conversion in ruby 1.8.7 from pdftk unicode conversion results

stackoverflow.com - 2012-05-17 15:30:30 - Similar - Report/Block

I am parsing titles from pdf files using pdftk has various language specific characters in it. This ruby on rails application I need to do this in is using ruby 1.8.7 and rails 2.3.14 so any encoding solutions built into ruby 1.9 aren't an option for me right now. Example of what I need to do: If the title includes a ü, when I read the pd...

Sixth Form F336 Coursework help

thestudentroom.co.uk - 2012-08-05 17:05:10 - Similar - Report/Block

I have chosen to do the synthesis of aspirin in three steps coursework and need help with the aims for the coursework Our teachers aksed us to split the aims into AS and A2 aims so i have already thought of AS aims but am struggling to come up with A2 aims With the coursework i am going down the route of synthesising the aspirin and check...

an objc syntax highlighting library that supports multiple language?

stackoverflow.com - 2012-04-08 12:25:16 - Similar - Report/Block

I come from the ruby and python worlds where we have many libraries that can syntax highlight arbitrary code from many languages. I am looking for something similar in the objc ecosystem, but i can't seem to find such, is there one available? The equivalent libraries in Ruby would be CodeRay Pygments for Python, thanks in advance!...

Sixth form Percentage yield from concentrations?

thestudentroom.co.uk - 2013-05-21 20:00:59 - Similar - Report/Block

N2 + O2 -> 2NO (reversible reaction) The first part of the question asks to find the concentration of nitrogen monoxide in the equilibrium mixture, given Kc, and the concentrations of n2 and o2, Kc = 1 x 10^-5 [O2] = 1.7 x 10^-3 [N2] 6.7 x 10^-3 Therefore rearranging, multiplying and then square rooting to give [NO] = 1.1 x 10^-5. Next pa...

Ruby on Rails by bestbuy612

freelancer.de - 2013-03-06 13:38:06 - Similar - Report/Block

Need someone to set up VPS running below, or newer versions. Postgres 9.1 Redis 2.6 Ruby 1.9.3 Also need to install a script from GitHub. Will also need someone to do general maintenance. (Budget: $30-$250 USD, Jobs: Ruby & Ruby on Rails)...

Не запускается rails server - Ruby

cyberforum.ru - 2013-05-03 19:38:37 - Similar - Report/Block

Добрый вечер! Стоит система система Win7 x64, это домашний компьютер и поставить другую ОС не предстявляет возможным. Ruby начал изучать совсем недавно было всё хорошо, до тех пор пока не переустановил ruby и rails. Сейчас при попытке запустить rails s, получаю ошибку: Код: d:/Ruby/lib/ruby/gems/2.0.0/gems/sqlite3 -1.3.7-x86-mingw32/lib/sq...

[BUG] Segmentation fault - Ruby on Rails

cyberforum.ru - 2012-08-03 09:35:27 - Similar - Report/Block

Пробую activerecord из ruby скрипта, выдает ошибку /home/roma/.rvm/gems/ruby-1.9.3-p194/gem s/json-1.7.4/lib/json/ext/parser.so: [BUG] Segmentation fault ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] самое главное пишет 1.8.7 в то время как ruby -v дает ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux] 1.9.3 ставил через rvm...

как установить mechanize на CentOS? - Ruby

cyberforum.ru - 2013-03-24 05:32:34 - Similar - Report/Block

Код: gem install mechanize ERROR: Error installing mechanize: nokogiri requires Ruby version >= 1.8.7 я обновил версию ruby по статье Код: # ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] Код: cat /etc/redhat-release CentOS release 5.9 (Final) как поставить mechanize на CentOS? Добавлено через 6 минут я обновил версию...


Fill out the form you see below. Registration is free, fast and simple.
If you are already registered, sign in page login.

Web Site :
Required Field
First Name :
Required Field
Last Name :
Required Field
Email :
Required Field
Sex :
Required Field

evolveStar.com is free for ever !

evolveStar.com provides a search engine that allows you to gather information to write their own blog.

evolveStar.com enhances the sources displaying the logo of the site.

If you want to remove your site or you believe a site listed infringes copyright, please report it to: info@evolvestar.com

Specifies the subject copyright violation and the url of the page

evolveStar.com respecting the law DMCA (Digital Millennium Copyright Act) will immediately remove whatever its merits.

Next will be effectual and relevant checks.

Who We Are Partner Advertising Contacts Privacy terms Help & FAQ

© Copyright 2010-2017 Fabrizio Fichera. All rights reserved.