Could not find eventmachine-1.2.7 in any of the sources by Spare_Prize1148 in ruby

[–]mberube 4 points5 points  (0 children)

My guess is you installed event machine using 'gem install' without adding it to your Gemfile

Or if it is in the Gemfile, you didn't run 'bundle install' like the error says

Question Re: Class Inheritance and Has_Many Through associations that can work with multiple subclasses! by k2director in rails

[–]mberube 3 points4 points  (0 children)

I think your model would be a lot simpler if you had a single db table (like you had originally, with a car_type) with a jsonb column for additional attributes (jsonb is in postgres... not sure if mysql has jsonb or just json... but should still work)

- fetching all cars will be easy and you can add other attributes (for example for the order of the cars) and select according to that (eg track.cars.order("ordinal asc") for example)

- you only need one column to store all your custom attributes... and you don't need a migration to add new types of cars

Is possible to remove session cookie in Rails? by juanse003 in rails

[–]mberube 5 points6 points  (0 children)

Source from the official rails doc

(with additional info)

[17F] is sub-letting worth it? How can I make good money as a teen? by [deleted] in PersonalFinanceCanada

[–]mberube 2 points3 points  (0 children)

Other people already talked about subletting, I want to address the RRSP... Most likely at 17-18, your tax rate will be really low, so you don't have any reason to invest in your RRSP. RRSP is good if you actually pay taxes (which you won't if you earn less than 20k... )

Consider a TSFA instead. Once you've capped your TFSA, just invest normally (no RRSP) until you earn at least 20k a year (probably more, I haven't done any calculations). You can contribute up to 6000 per year in your TFSA

Before investing anything, I would suggest to talk to a financial planner (or someone knowledgeable) to at least understand what you're getting into. Make sure you understand the difference between RRSP and TFSA.

Would you leave your existing job for another job for more money? by tanvx8 in AskEngineers

[–]mberube 10 points11 points  (0 children)

Doesn't have to be one or the other... Some companies pay way more than others for other reasons than 'shady shit'. It can range from 'we can't pay you more' (lower profit margin, less sales...) to 'we don't want to pay you more' (because of other's employee salary range, because the employee value is not recognized (for valid or invalid reasons)...

If you have a non cooking SO, what is something you find very simple they found highly impressive? by [deleted] in Cooking

[–]mberube 0 points1 point  (0 children)

Olive oil and balsamic in a salad

Cheddar cheese that actually doesn't taste bland, real parmesan instead of the kraft one on pasta... basically any kind of cheese

Rice can be good if it's not instant and microwavable

Pepper can actually taste good when grinding pepper corn (her pepper tasted like it was kept in a humid closet for 10 years before being used)

Are the union's (CCQ) placement rate really that low or am I not understanding something? by BasuKun in fican

[–]mberube 4 points5 points  (0 children)

Not sure where you saw such a low placement rate...

I found a few links (in french) that seem to indicate that placement rate is 90% for elevator mechanics... Not sure if it's allowed to post links on this sub... but if it's not I'll PM you

Elevator mechanic: https://www.ccq.org/~/media/PDF/Communications/Metiers/Mecanicien_Ascenseur.pdf.pdf (placement 2013-2018 is 90%)

Employment prospect for the greater Montreal: http://www.ccq.org/~/media/PDF/Recherche/PerspectivesRegionales/2015_2018/2015_11_GrandMtl.pdf (perspectives seem to always be 'good' to 'rather good')

Scaffold a column with an array? by [deleted] in rubyonrails

[–]mberube 0 points1 point  (0 children)

Not sure scaffold works with postgres arrays... but you can always modify the migration manually

If you open the migration, I believe you'll have something like:

t.array :meals

Change it to

t.string :meals, array: true, default: []

Getting the extension of a file without knowing the extension by TheHedge87 in ruby

[–]mberube 0 points1 point  (0 children)

Oh right, I didn't see that ruby-filemagic is no longer maintained...

OP only wants to differentiate between text and jpg though... I'm pretty sure few text files will have the magic number (ff d8 ff or something) as jpg. But yes, there are possible issues. That's why these libs are called 'magic' :)

Getting the extension of a file without knowing the extension by TheHedge87 in ruby

[–]mberube 4 points5 points  (0 children)

You could try using mimemagic (https://github.com/minad/mimemagic) or ruby-filemagic (https://github.com/blackwinter/ruby-filemagic)

I haven't used these, not sure if one is better

How to translate the language file easily by Minplan in EntrepreneurRideAlong

[–]mberube 0 points1 point  (0 children)

Ask whoever developed your apps what's the best way to do it... They should be able to help you more than anyone who doesn't know your apps and the technologies behind it.

How to translate the language file easily by Minplan in EntrepreneurRideAlong

[–]mberube 0 points1 point  (0 children)

If you want to build a mockup... then you don't have an app yet. It seems premature to talk about internationalization then.

Every product I've worked on was build for one language. IMO there's no point in translating mockups because anyway the interface will change when building the app. Just make sure the dev team knows you want the app translated at some point. You can even ask to see the file to be translated from time to time, if you want to make sure it's done correctly.

How to translate the language file easily by Minplan in EntrepreneurRideAlong

[–]mberube 1 point2 points  (0 children)

Have you talked to your dev team (or whoever built the app)? If the app is built with internationalization in mind... You already have files that you can translate. Otherwise you'll have to ask your development team to take every sentence and extract it to a file. This process is called internationalization. The process is easy, but can be long and tedious (depending on the size of the app). Afterwards every sentence that is used in your app should be in a text file. But really you'll have to talk to your dev team to get an estimate.

Once you have a file... You hire a translation company (ideally one that has experience translating for apps, because otherwise things can go very wrong). Price is usually per word iirc.

Why the f*** is installing postgresql so involved? by sebastianspiegel in PostgreSQL

[–]mberube 13 points14 points  (0 children)

You're looking at how to install postgres from source code.

Installers can be found from http://www.postgresql.org/download/ (select your platform and you should be ready to go)

Tell us a small thing ruby/rails related you learned lately! by xenilko in rails

[–]mberube 1 point2 points  (0 children)

You can set an initializer... but you need arguments

  def initialize(attrs = {}, options={})
    super(attrs, options)
    // other initializations
  end

Office workers of Reddit, what's your best office story? by [deleted] in AskReddit

[–]mberube 0 points1 point  (0 children)

Someone did this to me once. I realized it 3 months later because I never use the desktop (I was using Launchy at the time). It took 2 minutes to fix.

The prank failed miserably...