» Home » Ruby » Page 2
Ruby on Rails: rb_class_superclass not located in msvcrt-ruby191.dll (ruby-prof error?)
Category : Programming Languages

So, long story short, I had o format and reinstall my OS hence all my dev utilities.
git env sorted.
DevKit was fine.
Sphinx/mysql fine.
Bundle installed perfectly.
Everything is gravy until I go to rake db:create and build my database.

OS: Win7 64-bit
gem -v 1.8.24
rails 3.1.3

Now the problem, when I rake

View Replies

Ruby on Rails: Replacing the “LIKE” part of the SQL query with Ruby code
Category : Databases

In my application I have a "LIKE" SQL query that is something like...

Item.where("name LIKE ?", "%"+params[:q]+"%").all

But I want to hit the db only 1x (at application start-up), since the number of Items is huge, and load this generic part...


...into memory (a global variable), so I can later reuse its content th

View Replies

ruby eval method is halting the displaying of UI form in ruby on rails
Category : Web Design

I have written one helper method in rails that is populating the data in the select tag.

Data population in the select tag is done using eval method which evaluating some ruby code and after executing whatever data is returned from that ruby code it is then populated in the select_tag options.

My problem is in the UI form(select_tag and some labels) is not getting displ

View Replies

Executing a ruby file without calling “ruby” on the terminal
Category : Network & Servers

I have an app on a file named todo with this shebang in the first line: #!/usr/bin/env ruby. On the terminal, I want to be able to run this file calling todo new "Some Task" and not ruby todo new "Some task", but I can't make it work; I always get a bash: todo: command not found. What am I doing wrong?

I'm on MacOsX 10

View Replies

How can ruby do this task (Case-insensitive string search & replace in Ruby)?
Category : Programming Languages

I have some problem with replace string in Ruby.

My Original string : What the human does is not like what animal does.

I want to replace to: ==What== the human does is not like ==what== animal does.

I face the problem of case sensitive when using gsub. (eg. What , what) I want to keep original text.

any solution?

View Replies

Ruby environment messed up, How to uninstall ruby-gems-rails from Leopard?
Category : Programming Languages

my ruby environment in my mac Leopard is all messed up. And I want to uninstall the entire ruby, gem stack and install them again from scratch. How can I do it ?please point me towards a good resource on the net.


View Replies

Howto get include directories (ruby.h) for Linux Ruby C extension project?
Category : Operating Systems

I'm using scons to build a linux C based ruby extension. What is the "right" way to get the include paths right? By "right" I mean it works out of the box on 1.9 and 1.8.

I don't want to use the mkmf/Makefile solution.

Thanks! Dave

View Replies

Ruby on Rails ActiveSupport or plain Ruby way of merging arrays into a hash
Category : Programming Languages

What's a smart way of using ActiveSupport or perhaps regular built in Ruby functionality to take two arrays and merge them into a hash where each element in an array matches the element in a parallel array? imagine two arrays:

names = ["Danny", "Johnny"]
ages = ["25", "32"]

The end result should be a hash that looks like:

{"Danny" => "2

View Replies

Ruby on Rails Permission denied - /root/.bundle/ruby/1.8/specifications
Category : Programming Languages

I'm trying to install teambox on ruby. I am running passenger and getting this error:

Permission denied - /root/.bundle/ruby/1.8/specifications

I tried the following
chown teambox directory to teambox user
chown /root/.bundle/ruby/1.8/specifications to teambox user.

Please help!

View Replies

Ruby on Rails: send javascript array of arrays to ruby controller
Category : Javascript

I would like to send a javascript array of arrays to my ruby controller. I am a bit lost. My question is in the controller. Here is what I have so far:

(totalChanges is an array of arrays. JSON.stringify(totalChanges) might look like this:



<div id="dataTable"

View Replies

Prev          Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .