My Life with Ruby On Rails may include: Ruby, pgSQL, DevOps, Heroku, Kubuntu, Windows, Centos, Joomla and other general rants, stuff
Don't wanna be here? Send us removal request.
Text
Installing WSL2 on Windows 10
The last time I did this was two years ago and WSL2 was just released. I did write down what I did, but for reasons that do not occur to me never posted it. I'm sure it’s matured a bit, and new job, so I have to do this again, so will document so footsteps and following and all that.
Microsoft now has official documentation on how to install it. apparently now you can
c:\> wsl –install
however, you need to join the Windows Insider Program and that’s just too much work, plus the hard way is better. I do believe eventually we will get there, maybe a click install WSL but I digress…
So for now we will follow the Six Step Manual install route.
0. Install Windows Terminal Windows Terminal
1. In Windows Powershell as Administrator
c:\>dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2. We don’t need no Step 2, just run latest Windows and restart your machine.
3. Again in Windows Powershell as Administrator
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
4. Download the msi, then run to install WSL2 Linux Kernel for x64 WSL2 Kernal msi
5. Install Ubuntu from the Microsoft Store Ubuntu 20.04 LTS Store Download
6. Launch Ubuntu from store and wait. Then setup username and password, and write it down somewhere safe.
All Done!... Enjoy!
0 notes
Text
Thredded
I predict that forums will make a comeback as people turn their backs on facebook.
Anyway wanted to try out thredded ~ “The best Rails forums engine ever.” https://thredded.org
Surprisingly was not easy to setup. I set it up once, nothing worked. I tried another time, and used Zurb Foundation Templates.
It worked.. except for the layout, javascript UI/UX, which means it didn’t work. Foundation is a complex beast, with great power comes great learning curves, and between trying to get thredded working and fighting Foundation 6, I thought I would try again, from scratch, with bootstrap this time.
This is for a mac
So here goes. Thredded take 3!
had some errors with
$ thredded_create_app
more info about that later.
Firstly make sure you have yard install
$ brew install yard
$ thredded_create_app --rails-version 5.2.3 --verbose <forum_name>
Then in 'app/assets/stylesheets/_app.scss' add @import "thredded-custom"; on the first line
then
$ bundle exec rails s
0 notes
Text
Running SchemaSpy on OSX 10.9 with Postgres and Rails
Download SchemaSpy
Install Graphviz
$ brew install graphviz $ rvm list known
Find the Ruby you need in the list, in this case:
$ rvm install 1.9.3-p484
Then list out your gemsets
$ rvm list $ rvm use ruby-1.9.3-p392
0 notes
Text
Setting up a Mac/OSX for Rails development.
2018 Septemper update, using rbenv and pow.
Install XCode.
Install Command Line Utils $ xcode-select –install
Install Homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install node $ brew install node
Install rbenv $ brew install rbenv $ rbenv init
Install ruby-build & others $ brew install ruby-build $ brew install imagemagick
Install mysql $ brew install mysql
Add SSH to your git repo and clone into your mac.
cd to <project directory>
rbenv install <ruby version> to check which version required rbenv version.
gem install bundler
Install POW sudo curl get.pow.cx | sh $ cd ~/.pow $ ln -s /path/to/myapp
Setup settings files; database.yml settings.yml
Create Database Create your database.yml $ bundle exec rake db:create $ bundle exec rake db:migrate $ bundle exec rake db:seed
1 note
·
View note
Text
More people should be watching Whiteboard Friday! SEO masterclass by @moz https://moz.com/blog/category/whiteboard-friday
0 notes
Text
Get a quick SEO test on Nibbler from @silktide. http://nibbler.silktide.com/
0 notes
Text
If you need to make an exact PDF out of a WebPage as you see it, get the Open Screenshot Plugin from the Google Chrome Web Store.
0 notes
Text
Updates for 2016
5.
sudo chown -R `whoami`:admin /usr/local/share
6.
brew install gpg
Setting Up A Mac Mini as Rails Production Server
I have a Mac Mini Server Late 2011 just lying around and thought I’d turn it into a Rails production server, to run my software demo’s and do production testing etc etc.
It’s an i7 with 8GB RAM, which if you think about it is way more than I need considering the minute VPSes they have out there.
OK everything is setup so far, have Mavericks running so heres a checklist that you might need.
1. A “Rails Services Admin Account”
Create an account that you’ll use to administer the Rails applications , PSQL and other stuff, keep it seperate from your root account and your personal account.
System Preferences | Users and Groups | [+]
Then Login with your new credentials
2. Install/Update Xcode and command line tools
Get that in the App store. For Command line tools theres a great tutorial here. in short:
$xcode-select –install [enter]
if that doesnt work just download from apple
3. Install Node.js
Helps with asset compilation. Get it here
4. Update git
git clone https://github.com/git/git
5. Install or Update Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew update
6. Install RVM
You can use RBENV if you want.
$ curl -L https://get.rvm.io | bash -s
$ rvm requirements $ brew install libtool libxslt libksba openssl
$ rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/usr $ gem install rails --version 4.0.1
6. All Done
1 note
·
View note
Text
lets make a videogame how hard can it be
345K notes
·
View notes
Text
There is No Mobile Internet
The way we talk about things can limit how we think. We will design better if we talk about what people use our designs for, rather than the device they use them on.
You probably hear a lot about the “mobile internet”. It isn’t a new phrase.
You might have heard that it is killing “desktop” or the “web”, or that “wearables” are the next big thing, and they might even kill the “mobile internet”.
I’m calling bullshit.
The cool kids often look at the new thing and think that it will replace the older thing, because — apparently — there can only be one thing.
People said television would kill radio, apps would kill the web, social media would kill email, instant messaging would kill email, and Slack would kill email.
Viva la revolución!
Desktop and web and apps and mobile and wearables are not separate things. They are all doors into the same internet.
Just like instant messaging, social media, Slack, and email are all communication tools but they all have different strengths and weaknesses. We use them all together, but differently.
****
Language influences our ideas.
Imagine, for a moment, that you had never heard the word “mobile”. Imagine if we had called all of our devices “computers” — which they are — instead of different levels of “mobility”.
So your laptop is your “large” computer, your smartphone is your “small” computer, your watch is your “mini” computer, etc.
They all do the same things, and they are all connected to one internet, and your one product can exist on all of them.
Would you think about your design differently if you only had one product that just happened to be accessible from several different types of computers?
Yes, you would.
Android apps must work on a variety of different screen sizes, and so do iPad apps, but we don’t design for the “mini” app store or the “big” android devices — because we call them all “Android” and “iPad”.
You think responsively by default, because you think of them as one thing.
With “mobile” and “web" and “wearables”, we choose and prioritize and separate, instead of thinking about them as one thing. And then we are tempted to just “make it work” for the ones we don’t choose to prioritize.
****
We should be talking about “depth" and “continuity”. Not mobility.
Instead, let’s think about devices based on the things you can do with them.
Some devices allow us to have more on the screen at once, and allow us to be more precise because they use a mouse cursor. Let’s call that “depth”. You can go “deeper” into the task.
Some devices can be with us all the time, and we can use them more frequently because they are always with us. Let’s call that “continuity”. They are with us more continuously.
Depth:
For example… let’s say a Google Spreadsheet is a “deep” task. It has a lot of moving parts, and details, and if you’re a power user, it is something that might be very a powerful tool with a lot of customization and features.
It is virtually impossible to use a spreadsheet on a phone the way you use it on a desktop screen. It’s just too complex. And that’s ok! It’s also way more powerful.
On the other hand, let’s say checking the weather is a “shallow” task. Basically you just open the app and look at it. You might tap once or twice to switch between today’s information and this week’s information, but basically you just look at it. Like a car crash.
The weather is useful, but it’s not deep or powerful. You’re not calculating your company’s profit margin this quarter, you just want to know if your hairstyle is in danger.
A laptop device allows much “deeper” tasks than a phone or a watch. The screen is bigger, it has a keyboard, etc. An iPad is almost is good. A smartphone is a little less good. And a watch only really has enough screen space and inputs to do “shallow” tasks.
That’s “depth”. It can be shallow or deep or anything in between.
Continuity:
In my opinion, a laptop and an iPad are very “mobile”. I carry my laptop to work every day, so mobility is not what defines it. If Apple would put a fucking SIM Card slot in a Macbook like I have wanted forever, it would be the most powerful mobile device I own.
But a laptop is not very “continuous”. A laptop and an iPad are big enough that I want to put them in a bag when I go somewhere, where I can’t see them or hear them. I can still use them on the subway when I sit down, but if I am walking through a crowd, or pretending to go to the bathroom so I can check Reddit during work, a laptop is not exactly subtle.
That’s “continuity”. It can be available any time or only when I sit down, or anything in between.

****
Deep devices are usually less continuous.
Continuous devices are usually less deep.
To make a device continuous it needs to be with me always, which means it has to be easy to carry, which means it needs to be small.
To make a device that can do deep tasks, it needs many types of input and a large display. If we’re talking about screens, that means depth and size go together.
If you think about devices this way, then it’s not about mobility. It’s about use cases.
You design shallow, “always on” experiences for small, continuous devices. But those experiences are probably quicker and simpler.
You design deep, "focused” experiences for large, non-continuous devices. But those experiences might be more powerful and more complex.
You might use Facebook for an hour on your phone, but you’re not doing anything “deep”. You’re doing a lot of shallow things, quickly: Likes. Notifications. Looking at pictures or videos. Maybe an article or two.
Designing a website is a deep task. How often do you use Photoshop or Sketch on your phone, to do professional design tasks? Never? That’s because it is one big task with tools and layers and plugins and it takes a while to do it.
Try ONLY working from your phone, all day. I dare you. Then tell me that smartphones will replace desktop computers with a straight face.
****
Design across devices. Not for devices.
Sit down and think about all the tasks and features that are related to your product, including things that your product doesn’t do yet.
Think about whether they are deep or shallow.
Think about whether they need to be continuously available or sometimes available.
Many tasks might fall into more than one category, or between categories. That’s fine. You decide where to “draw the line”.
Can you seperate big tasks into the shallow/deep parts and always/sometimes parts?
Prioritize the shallow/any time stuff on smaller devices. Prioritize the deep/sometimes stuff on bigger devices.
Use the power of big devices to improve the experience of smaller devices, and the availability of small devices to improve the experience of bigger devices. Netflix does this by remembering what you watching on your phone, so you can resume watching on your laptop.
****
The is only one internet. Mobile devices are just one way to get there.
24 notes
·
View notes
Text
Random Date
Need a random date between the beginning of this month and right now?
Time.at((Time.now.to_f - Date.today.beginning_of_month.to_time.to_f)*rand + Date.today.beginning_of_month.to_time.to_f)
0 notes
Text
Installing PostgreSQL 9.3 on Kubuntu
I referenced here and original post
sudo apt-get install postgresql-9.3
install pgAdmin III if you want to
sudo apt-get install pgadmin
create user, attach to sudo and set password
sudo -u postgres psql postgres \password postgres CTRL+D
0 notes
Text
Enabling external drive for use in Kubuntu
Launch KDE Partition Manager, Create new Partition then format. Find out your mount point by
$ mount /dev/sdb1
or whatever it is.
It should return to you something along the lines of:
mount: according to mtab, /dev/sdb1 is already mounted on /media/pcname>/drivelabel
Then just
sudo chown -R username /media/pcname/drivelabel
Starting to like kubuntu more than my mac
0 notes
Text
Testing in Multi-Tenanted Rails App
So I've been on contract for almost 18 months, and while testing was important it wasn't a prerequisite to submit code. So for the our multi-tenanted app testing, I set up everything as Cucumber with Selenium and pointed it our QA servers, I eventually expanded it to the staging and even production boxes.
While it was catching errors, it just wasn't right because it was bypassing our CI and was just automating user testing rather than being automated testing. I came back to it a few times but I didn't make any real progress on it until today.
So finally today was breakthrough day, you know you just try something again and suddenly you just figure it out and it works... well enough rambling. heres the important bits.
assuming you have a subdomained app:
yourkewlcompany.mykewlrailsapp.com
spec/spec_helper.rb
RSpec.configure do |config| . .
Capybara.app_host = "http://yourkewlcompany.mykewlrailsapp.com/"
end
Well, that's it, really, yeah I know.
0 notes
Text
MacRuby is essentially dead
Was trying to check out MacRuby because I did see they had a pretty good tutorial. After downloading and getting it running in Xcode, I ran into problems, I ran into problem #226. It also hasn't been committed to since August 2013 which is close to a year now.
I mean it is open source and I could help update it but I really am not that smart, so I'll just just can that idea. So I would say basically MacRuby is dead.
Sure you can get RubyMotion but it's not free to casually try out. For me it's MYR 681.69. Which is about 30% of an average monthly salary here. I understand people need to make money, and once I need it for a project I'll definitely pay and look into it.
0 notes
Link
We’ve recently moved FTBpro’s Ruby on Rails servers to the newest Ruby version on earth - Ruby 2.1. It has been running on our production servers for the past two weeks. Our stack includes: MySQL, MongoDB, Rails 3.2, ElasticSearch Memcached and Redis. We wanted to share our experience of making...
3 notes
·
View notes
Photo
SHERLOCK FONTS MASTERPOST
I had nothing to do this morning so I collected all of my favourite fonts from Sherlock. I know some of these are already identified and well-known - but here they are. Very good to save as reference for graphics/edits.
Here are the download links to the ones who aren’t already installed on your computers, in chronological order (and what they’re mostly used for):
P22 Johnston Underground - Deductions
I AM SHERLOCKED (Free) - Titles
Astoria - John’s voice in Sherlock’s head
AF Generation Z - Text messages and deducitons
The Recon Legend (Free) - Newspapers, headlines.
P22 Underground Light - Hashtag “#SherlockLives”
Aster EF Medium - Speedy’s. Not sure of this one, but it’s similar.
Helvetica Neue Pro Cond Bold - London Street signs.
Clarion Pro Regular - John’s blog header.
Bebas (Free) - Mayfly man scene
Trajan Pro 3 (Similar free font) - Irene’s website photos
Novin Bold (Similar free font) - Baskerville military base font
FF Meta Pro Normal - The museum in The Blink Banker
Shanghai (Free) - The circus’ font in The Blink Banker
I hope this will become useful!
52K notes
·
View notes