Ruby is an open-source dynamic object-oriented interpreted language created by Yukihiro Matsumoto (Matz) in 1993.
0
votes
0answers
12 views
Recreating something like codeacademy in rails - associations correct? use a state-machine?
I am creating something along the lines of codeacademy in a different vertical.
I expect my db associations to look something like this:
user: 'has_and_belongs_to_many:classes'
classes: ...
0
votes
0answers
8 views
Rails application with pusher/faye
Iv'e been asked to make an app like this one: http://www.dealcent.com/
Im having trouble figuring out how to make the bids update, i think that i could use something like pusher or faye ...
1
vote
1answer
11 views
Storing and Processing Large XML Files With Heroku
I'm working on an app that needs to store a large (2+ GB) XML file for processing, and I'm facing two problems:
1) How to process the file? Loading the whole file into Nokogiri at once won't work. It ...
0
votes
0answers
13 views
Segmentation Fault when running rake db:migrate [MAC]
I'm trying to run rake db:migrate in Rails, and every single time I try I get the same error :
[BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.3.0]
I have ...
1
vote
0answers
9 views
Rails nested_forms not displaying fields when dynamically adding extra objects
I'm currently using the nested_forms gem and I'm trying to be able to add multiple landlords to a property.
At the moment the associations are quite deep:
Property -> Landlord -> Contact_Detail -> ...
3
votes
5answers
37 views
How to extract only time items from a hash?
I have a Hash like below:
{"19th Apr, 2013" => :a, "20th Apr, 2013" => :b,"Tomorrow" => :c,"5:00 PM" => :d,"09:25 PM" => :e}
I want the output:
as {"5:00 PM" => :d,"09:25 PM" ...
0
votes
1answer
16 views
Rails - joiner model with a flag, condition not saving?
Here are my models:
Team:
class Team < ActiveRecord::Base
has_many :team_users
has_many :users, through: :team_users
has_many :admins, through: :team_users,
...
0
votes
1answer
17 views
Ruby on rails app debug and develop
I have been in Ruby on Rails for a while. Now I clone a very nice project from GitHub and i want to debug it with RubyMines.
Can someone please sugest me how do i proceed further? Do I start with ...
0
votes
0answers
11 views
Is building a production web application using MagLev for ruby a good idea?
I'm a fan of Rails and ruby in general, and may embark upon building enterprise applications for financial institutions. I really like the idea of maglev, and wonder whether it's worth consideration. ...
0
votes
1answer
25 views
ruby glob for one-level subfolders
How can I write glob that will match files only if one-level subfolders? I have a structure like that: src/items/item-name/file.ext
And I need a glob that will match only these files, not ...
1
vote
1answer
21 views
Send errors to another log - Ruby on rails
I wanted to know if I can send all the errors that happend while my app is in 'production' environment to a new 'log' instead of sending ALL the actions to the 'production.log' send it to ...
0
votes
0answers
4 views
soundCLI installation fails
I am trying to install soundCLI, but running gem install soundcli fails with:
^^ More stuff ^^
checking for attribute assignment... no
checking for Win32 OS... no
checking for gstreamer-0.10... yes
...
0
votes
1answer
17 views
OptionParser throwing 'Missing Argument' for no reasons
I only have 1 possible option and it is parsed as following:
def parse_options
options = {}
options[:markdown] = false
OptionParser.new do |opts|
opts.on('-md', '--markdown', ...
0
votes
1answer
39 views
How do I fix an invalid multibyte character in regex?
I have a regex:
/[!,.!:;\-\?\(\)"\s\n]/
Which works fine, but when I add:
«»
to the regex it causes an error:
invalid multibyte char (US-ASCII)
What is wrong? How do I fix that?
0
votes
1answer
28 views
Rails model is not setting attribute
am very new on rails development
Rails 3.2.13 / ruby 1.9.3
I have this model
class Post < ActiveRecord::Base
attr_accessible :content, :title
attr_accessor :testing
def asignar
...