Alan Reid

Joined

42,250 Experience
331 Lessons Completed
8 Questions Solved

Activity

Posted in What are your goals for 2017?

@Adrian yeah its crazy! Kids are like sponges so its great to get them involved at a young age i think personally. My son has had this book since he was born.. http://codebabies.com/product/web-design-for-babies-2-0

Posted in What are your goals for 2017?

Here's a sneaky peek...

Posted in Lots of trouble using LESS in a paid theme.

SASS and LESS are actually quite easy to convert to each other, I know this is old but happy to help anyone if needed.

Posted in What are your goals for 2017?

@Nick, yeah continued learning for Rails is still my main aim. I also have Angular 2 on my mind. I am also looking to relaunch my CSS library with a new name too :D So will be quite cool. I will let you know about the Pi stuff, so far my lil server is working well. Should have a stack of them setup early next week.

@Patrick, Good Luck with the business mate, i hope it works out well. - Nice site btw. And even more luck with the family, kids are great but they grow up way too quick! My son is almost 3 and he's already telling me about how hes coding, and messing with terminal commands to make his server faster, while hes on his iPad haha :-/ - what have i created?!

Posted in What are your goals for 2017?

Hello all!
Hope you all have a great holiday and heres to an awesome 2017 to you all :)

One of my goals for 2017 is to learn new stuff. One of the things i want to do, is to expand my understanding of how my app would work if hosted across multiple servers. While also learning abit more about non-IIS hosting enviroments - I come from a .NET background.

Well to kick off 2017, and further this goal I've invested in some Raspberry Pi's which will become my development test server.

All is good so far, I have it all set up and working well with just one Pi device, and I'll be moving on to add more nodes shortly. I will be posting my findings on my blog soon, so I will share the link here if anyone is interested once I'm done.

From what I have read so far some people are hosting sites with around 50k monthly visitors on a cluster of 2 Pi 2's so its pretty cool. Well to me it is haha :)

I was wondering if anyone has tried this before? I'd be keen to hear how you did it.

Finally, what are your goals for 2017? I have a couple more, but please feel free to share yours too, and then check back to see if you managed to complete them later in the year.

Hi
I have a helper method, which converts currency to pounds. Is there any reason why this donest get picked up in the mailer templates, but works thoughtout the rest of the site?

Posted in Changing currency

@sites.currency.downcase.to_sym worked a treat buddy, thanks :)

Posted in Changing currency

I would like to change the currency in my app for each site.

So i currently have number_to_currency(aNumber, :locale => :gb) which works well. I have a number of sites which use different currencies and have their country set in @sites.currency - this passes in gb, eu, us, vi for example.

How would i go about changing the :locale => :fr to :locale => :gb as currently i can only get it passing in as a string, which is not obviously valid.

Posted in 5.0.1 out of RC?

Oh cool, i only hit their homepage, slight relief that is a final release. I will keep going as i was :)

For reference - http://weblog.rubyonrails.org/2016/12/21/Rails-5-0-1-has-been-released/

Posted in 5.0.1 out of RC?

I just did a bundle update and my app updated to Rails 5.0.1, it looks like this may have come out of RC. However there is nothing on their site yet. However their github is stating the buuld is failing :/

Just thought i would give a heads up not to update your rails install just yet.

Posted in Meaning of “Expected string default value for …”

It is odd, but least its sorted and i can now build projects again. Hopefully this will help someone else who faces the issue cause there wasnt much out there.

Trust me to run into the issue haha

Posted in Jekyll, MiddleMan or CMS for a blog site?

For your guest post i would simply use the front matter. The following example is from a post off my site.

---
layout:         default
title:          Setting up Rails and Jekyll (Part 1)
type:           post
navigation:     false

date:           2016-10-14
excerpt:        In part 1 we are going to get Rails setup, and test our install.
categories:     rails jekyll setup guide
image:          articles/setting-up-rails-and-jekyll/setting-up-rails.png
details:        false

author:         Alan Reid
bio:            I'm a freelance designer/developer who enjoys creating beautiful and standard compliant solutions for my clients from all around the world.
---

All you would need to do is change the author and bio and your done. Saves messing around too much.

Posted in Meaning of “Expected string default value for …”

So I started to test this out. And I created a couple of different projects rails new testapppg and rails new testapp-pg.

On both of apps I changed the thor gem gem 'thor', '0.19.1'. I then went on to run bundle update, and create the DB. Now both of these projects created the test models when running rails g model sample

Cool! So that is the fix. So I went back and recreated my pxl-insight app, updated the thor gem, created the DB. Now when I went to create the model I get the errors again!?

So my next question is does Rails cache project names? which is why the new projects worked fine, but the one with the previously used name causes the error?

Posted in Meaning of “Expected string default value for …”

Cool thanks Chris, that didnt work though. I am really not too sure why this is now suddenly happening.

Posted in Meaning of “Expected string default value for …”

The only change to my system that i can think of is that i updated to macOS 10.12.2 the other day, and I had not created any project after that until now. Previously they always worked fine.

$ rails -v
Rails 5.0.0.1
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]

I thought i would try running $ rails g --help and i am getting the error there too.

Running via Spring preloader in process 32228
Expected string default value for '--jbuilder'; got true (boolean)
Usage: rails generate GENERATOR [args] [options]

General options:
  -h, [--help]     # Print generator's options and usage
  -p, [--pretend]  # Run but do not make any changes
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -q, [--quiet]    # Suppress status output

Please choose a generator below.

Expected boolean default value for '--markerb'; got :erb (string)
Expected string default value for '--helper'; got false (boolean)
Expected string default value for '--assets'; got true (boolean)
Rails:
  assets
  channel
  controller
  generator
  helper
  integration_test
  jbuilder
  job
  mailer
  migration
  model
  resource
  responders_controller
  scaffold
  scaffold_controller
  task

ActiveRecord:
  active_record:devise

Coffee:
  coffee:assets

Devise:
  devise
  devise:controllers
  devise:install
  devise:views

Js:
  js:assets

Mongoid:
  mongoid:devise

Responders:
  responders:install

Sidekiq:
  sidekiq:worker

TestUnit:
  test_unit:generator
  test_unit:plugin

I found these 2 issues on the rails repo which discuss this issue.

https://github.com/rails/rails/issues/27256

https://github.com/rails/rails/issues/27310

Posted in Meaning of “Expected string default value for …”

So i am starting a new project, and have done this meany times now. However this is the first time i have hit this issue!

I created the app as normal rails new myapp -d postgresql

I've created the DB using rails db:create and ran the site rails s. Awesome!! It all works, and i see the Rails welcome/holding page.

Now i start to create my models, rails g model user for example. And i get this!

Expected string default value for '--jbuilder'; got true (boolean)
      invoke  active_record
The name 'User' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.

ok fair enough, i get the error message. So i thought i would test out another model. So i run rails g model testing, and i get...

Running via Spring preloader in process 31815
Expected string default value for '--jbuilder'; got true (boolean)
      invoke  active_record
      create    db/migrate/20161217171019_create_testings.rb
      create    app/models/testing.rb
      invoke    test_unit
      create      test/models/testing_test.rb
      create      test/fixtures/testings.yml

Has anyone else had this issue and if so any ideas why? I have tried running bundle install and bundle update with no luck.

Posted in Jekyll, MiddleMan or CMS for a blog site?

I use Jekyll a lot, its fantastic! I would advise using it if its a simple blog or site which does not need users to login and have accounts. If you need comments on your articles just use Disqus. Its pretty expandable!

Why? Well, you're not reliant on a DB so no slow down there, or additional failure point. Jekyll also uses markdown, which means you get nice HTML generated and dont have to worry about rouge styles getting in there and messing hings up.

As a starting point you could start with a Jekyll site, and the update it to somthing more later if you feel the site is growing well. - You can add a forum as a subdomain, and you can even have guest posting too.

Posted in Announcing the GoRails Forum

It has grown so much since i joined, you should be proud mate

Dont forget the Shrie videos Chris made, i found them really handy. And i would go with this over CarrierWave now personally.

First one is here https://gorails.com/episodes/file-uploading-with-shrine

Posted in Announcing the GoRails Forum

Loo how far its come. Keep up the good work Chris!

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.