If your computer has OSX 10.11 El Capitan, and try to create middleman project then write bundle to install gems. But you can get
123456
Installing eventmachine 1.0.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
In file included from binder.cpp:20:
./project.h:116:10 fatal error: 'openssl/ssl.h' file not found
include <openssl/ssl.h>
1 error generated
like above error. You have to solve problem with openssl .
For fix it ;
1
brew link openssl —force
then you can run bundle now. For detail about this problem please look at this link
Sometimes while you are adding bootstrap to your rails app, you can getting some problem on javascript side. In this article I try to explain how we can fix active class to navbar . For fixing, you can write in helper active_class method like below
Firstly I created new rails app, after that created several models, or you make some changes on your model manually(wrong way), while you are running rake db:migrate getting error for an existing model in your app. For fix that issue
you can write,
Uzun zamandır ingilizce olarak yazdığım yazılara ufak bir ara verip, türkçe yazılar paylaşmaya çalışacağım.
Tabi amaç dile yatırım yapmak, neyse lafı daha fazla uzatmadan biz konumuza dönelim. Bu yazımda, App engine ile PhpStorm
üzerinde nasıl çalışır, nasıl proje oluşturulur ve nasıl deploy edilir işlemlerinden bahsetmeye çalışacağım.
Google App Engine
Öncelikle herhangi bir google hesabınızla Google App engine sisteme giriş yapmanız,
hesabınız yoksada basit bir google hesabı oluşturmanız gerekmekte, siz hesabı oluşturduktan sonra google size ücretsiz
25 repoluk bir sistem oluşturuyor. Giriş yaptığınız sistemden öncelikle bir proje oluşturuyorsunuz. Sistemde proje oluştururken
dikkat etmeniz gereken nokta Application Identifier kısmı zira burda aslında sayfanızın url kısmını belirlemiş oluyorsunuz (proje_id.appspot.com).
Tabi belirledikten sonra daha önce böyle bir adres kullanılmışmı diye kontrol etmeniz gerekmektedir, yoksa projeyi oluşturamıyorsunuz.
Ardından localinizde PhpStorm’u çalıştırıp, Create New Project kısmından yeni bir proje oluşturup,
I try to explain fix N+1 on example. Let’s start, firstly, in your rails application, you created association between user and user_profile
models like below :
You want to get some information like name, surname, email when user login on Android, and show on
second activity these information , we can use getExtra and putExtra . There are a lot of method for getting information
from first to second activity, I try to explain getting with getExtra and putExtra on getting user name and surname to
show second activity, let ’s start,
Firstly I created two label(TextView) for definition to name and surname and EditText for enter name and surname to users
on activity_main.xml,
Then we created new class under src folder and under the package name SecondActivity.java, and under the
/res/layout/ folder created secondactivity.xml .
For definite and connect between main and second activity open AndroidManifest.xml and create new activity for
second .
If you make connection between first and second activity, this means, you can go to from first activity to second activity
but you can not return to previous page, for return to first page, we can use very common method, onBackPressed().
Where you want to use button for return from second to first, open your secondactivity.xml
If you are update or upgrade your pc, you can getting error about menu bar for date – time missing .
For fixing this bug, you should write below commands step by step ,
Uzun zamandır düşündüğüm bloguma türkçe destek eklemekti. Bunun nedeni ise birçok yabancı konunun (yazılım anlamında) türkçe desteğinin olmamasıdır.
Umarım faydalı olur.
I want to sticker notes for my pc, when I search about it, I found sticky notes for Ubuntu 13.10 .
This notes provide to reminder of something like a agenda, when you wrote some notes inside,
you see always the notes. If you want to add sticker notes you can use below command.
Firstly you should create middleman project , if doesn’t exist it. Then in your project,
open config.rb file add below code,
1
activate:i18n
when you add above code, you can active to :i18n. i18n extension provides a way to localize your site.
After that you should add path of your locale directories in your project roots ~/MyProject/locales directory and code
should be seems like below
Vagrant is a application which improved your application in virtual machine, this means that,
you can create your project environment on virtual machine. Thanks to vagrant, you cloned local environment on virtual machine.
So, when you sent to your project to server, you can’t see any bug or error on your server.
On the other hand vagrant is useful, while you are working in a team.
For the install and use vagrant, you should follow below steps respectively.
Let’s look, how to set up and use Vagrant in Ubuntu desktop,
If you create middleman or rails project and you want to add pagination in your pages with js.
You can make easily with below codes
123456789
varnumberOfPages=14;functionaddPage(page,book){if(!book.turn('hasPage',page)){setTimeout(function(){element.html('<div class="data">Data for page '+page+'</div>');},14);}}$('#number-pages').html(numberOfPages);
While I was creating demo for scroll page,
firstly I created middleman project according to haml and sass, but if you want to embed in your for example rails project,
you can embed in it. In this post, I try to explain creating scroll page according to middleman page.
You need to create new app on right-up corner of webpage
Now upload your font-icons after press import icons buttons,
Be careful, because your fonts format must be svg format,
When upload your icons, you should rename your icons,
Now select which rename icons, and go to download your icons,
When you download icomoon which provide to you with css and js files for font.
When you are opening which download file, you can see this file and copy font directory and
paste in your assets for rails projects.
Go to css file in which download icomoons files, copy css file and paste in your style file
(If you are using sass or less, you should convert to sass or less).
Another way, you can create new file in stylesheet folder like
If you have some pdf files which include images and want to extract all images like a image file,
you can make it easily. Firstly, you should install poppler-utils in your machine, with
You use devise gem for add admin page or user page to your project. When you generate to your devise gem,
you’ re getting error to your project, like ;
12
$ rails g devise:install
Could not find generator devise:install
Internet like in real life, There are two sides for internet communication. While one of this is making request, another of this
have to respond to this request. This loop is named
I formatted my computer and then for my octopress blog What can I do ?reinstall or WHAT?
In this post I try to explain, if you have a new computer (after format, buy new computer…etc)but you have octopress blog
how to entegrated each other?
Firstly, if you don’t have a google-analytics account, you should create it. Then when you create account, google-analytics provide to tracking ID for your octopress blog. This tracking ID like
AB-12345678-9
and then you should get this id, opened _config.yml in your octopress blog project,
How to change DNS settings (ip address) or How to set up Google public DNS for Ubuntu Desktop?
Firstly, we should look at Google Public DNS.
What is the Google Public DNS?
Google DNS created by Prem Ramaswami at 2009 . Google Public DNS provide to free DNS settings.
Without DNS, it wil be difficult to know IP address of websites which visit daily.
CSS Sprite means that combine all images in a single image file. The aim is that,
when we upload several image file for use in css or sass file, you should upload to each.