Search

Catch ex as Exception

Codes become things.

ExecJS::ProgramError in Welcome#index – Ruby on Rails

This is my 5th day of my Ruby on rails. And early morning, I’ve been trying to find out the cure for this. And then I came across the solution.

railsprob

In your /app/views/layouts/application.html.erb line 5 and 6, change the first parameter application to default. Credits to the Source.

This is going to be a happy day coding. 🙂

 

Advertisements

Ruby on Rails. Cannot connect to localhost://3000

I came across this error when I just finished the installation. I managed to start the server in cmd shell. But then, I cant seem to connect to localhost//:3000.

What did I do? This is for Windows.

  1. Go to Control Panel  – Windows Firewall – Advance Settings then Click “Inbound Rules”.Follow the screenshots below.
  2. I came to this solution because I think maybe a firewall is blocking or not allowing the access to PORT 3000.I am not sure but this is what I did in connecting MYSQL Server.

If done, restart the PC. Also check if you typed the correct Url. I think it should be localhost:3000 .

Then start the Command Prompt with Ruby and rails. Repeat the start server procedure,  >>site – cd (nameofproject) – (rails server) .

 

Happy Coding!

 

ino

Ruby for this week.

I got tons of motivation to finish learning this language. Sounds fun. 🙂

Motivation.motivation please.

What’s inside my bag?(IT Professional’s Stuff.)

People are wondering how come I always bring such a lousy,big backpack everyday. This will be the first time in my life that I will reveal my personal stuffs. What should be inside my bag.? or who cares.

For those who are starting their careers as an IT professional, you should at least know what stuffs you should invest on to make things come in handy. First should be your BAG. Yes, it is very important to invest on a good quality backpack to accompany all your things. This is my new bag I bought on sale ..(Mackar). Mackar has a good quality features and the price is cheaper than any other brands in the market. It is also water resistant and comes with small pockets inside. I chose this style also to minimize snatcher’s attack and lessen my “praning (paranoid)moments.”

Mackar
My new bag.

Let’s get inside. I took all my things out and took a photo of them.

Mystuffs

A lil bit messy. But as you can see, almost all the stuffs that I need. From laptop to my alcohol.

  1. Laptop – isn’t it a bit scary if I don’t have a thing like this. My life would be miserable at best.
  2. USB HUB – Yes, I have this 7 port USB 2.0 hub I bought for only..hmm.I think less P500. I bought it on sale. This is really useful if I have multiple devices to plug all at the same time.
  3. Philips Fitdot MP3 Player –  I travel almost 100 km back and forth from home to my work everyday. And this comes really handy to me. Also can use for biking, rollerblading,jogging for it can be strap anywhere.
  4. ID – of all the things, this is one of the most important stuff that should be found inside your bag. Whatever happens to you, you have your personal identification.
  5. Laptop Lock Cable –  I never dreamed of losing my other half. My sister gave this to me last Christmas. Often used inside the cafe.
  6. Powerbank – Empty battery mobile phone is no longer an excuse because of this. This 20kmah powerbank keeps my devices charged even for a week.
  7. Flash / External Devices – Backing up my files should always be a priority of a software developer. Or anyone engage  in software development. This also keeps my movies, anime series, programs and other scripts.
  8. Personal LAN Cable – for me, everyone should have it. To also avoid crimping cables all the time. You should have your personal one.
  9. Mini Vacuum –  this is really, really one of the most important to me. As I hate seeing dust and bits of snacks on my keyboard. Keeps your laptop clean and neat.
  10. Cables, cables, cables – different cables of my different stuffs. Without them, my devices are dead.
  11. Mini Purse – this stores my mini flash drives to avoid having them misplaced.
  12. Flash light w/ Stun gun –  for my own protection..self defense. 🙂
  13. Mini USB LED Light –  I use this for late night browsing..in the dark of course. 😛
  14. Little notebook –  I used this mainly to jot down my daily tasks and researched kali scripts.
  15. Ethyl Alcohol – keeps my hands sanitize.
  16. Mobile Phone –  This is my portal for the other people in my life.
  17. Wireless Mouse – it’s actually inside the case. Yes, you should have a wireless mouse everywhere you go.
  18. Personal Hygiene Kit – every programmer should not stink. Yes, save yourself in trouble by making yourself look good and fresh breath.

I guess this is all I can share for now. 🙂

When you think “you don’t matter.”

Maybe I am just hallucinating. Or maybe this ain’t my time. Or maybe my skills don’t matter. Maybe I should try more. Maybe I should be better.

Protected: Hello. [Life Blog: Scroll Down and Skip.My life won’t matter.I think.]

This content is password protected. To view it please enter your password below:

Text to Binary Converter! -Python

I just want to share my simple yet powerful function of converting your hidden text to binary format. I know this sounds strange or st$pid. As they say, there 10 types of people..those who understand binary and those who don’t. There’s also a BIF in python..to convert numbers to binary.. the bin().. but hey..it won’t convert text. So I tried to figure it out. I know this really sounds easy for some..but pardon me..i’m a beginner.

I used to keep a diary since I was young.i was in my first year hschool when I learned about binaries. Pretty interesting. And now I’m digging holes in python. I think maybe this is the best example of a simple dictionary..mixed with loops.so much for that. I even added parameters for spaces..but not all punctuation.Now you can easily convert your well hidden notes to something not all silly creatures will understand.

binary

This is my output.

My output
My output

You should also check this out.Python Samples .. i saw a sample program regarding binary to decimal. Much simple.but then I pre defined my set of alphabets ..and that’s the difference.

now deploy it to your desktop.now.run this code.

output2

NameError: name ‘reload’ is not defined – Python 3.5

I came across the tutorial of bucky..on how to reload a module in python shell. This this thing came up.. is python biting me? haha. Well.. i found this might be helpful. Simply import the

import imp before trying to reload the module. take it form here. IMP.

RELOAD

There you go!

RELOAD2

This is 39th tutorial of bucky. Happy coding!

Blog at WordPress.com.

Up ↑