There are a very few mobile OS of which iOS and Android are hot in the current market trend. There is a huge battle between these two operating system to become the best among the mobile OS. Let us compare iOS and Android based on the factors like UI/UX, performance, applications etc.
The latest smartphone of Apple, iPhone 5s has got dual-core processor where as the other high end smartphones of Samsung, Nokia have quad-core processor. Will this mean that quad-core phones are faster than dual-core smartphones? No. The performance depends on not only the hardware, but also on how the OS use the hardware. Though high-end smartphones like Samsung Galaxy S4 have octa-core processor, the Android OS does not use the hardware efficiently. The smartphone is not lag free even with that powerful octa-core processor. But taking Apple’s iPhone 5s, the performance will be smooth and lag free even with its dual-core processor. The reason is that hardware and software for Apple products are developed by Apple itself. To be more precise, the hardware and software are built in such a way that both can interact easily and in efficient way. If we take Google’s Andoird OS, it is build in generic way, so that it can support multiple number of different smartphones. Taking Apple, there are a very few models. But considering Apple, there are several hundred models. Google cannot develop a version for each of the smartphone in the market. The generic Android OS will be customized to suite a specific smartphone. This is not in the case of Apple products. The hardware and OS bind to each other in efficient way to give better performance(with just dual-core processor) than high-end smartphones. Apple achieves great performance with low-end processors compared to other Android devices.
Who wins – iOS is more stable and lag free compared to Android
User Interface & User Experience (UI/UX)
Both iOS and Android have a clean and neat UI. Android OS are customized by the smartphone manufactures to deliver their specific user interface and experience which sometimes makes it less stable in UI. But the UI/UX is more flexible and fluid in Apple iOS compared to Android smartphones. However Android has got huge number of third party applications to customize to specific needs.
iOS is the winner
Apps & Games
Both Apple and Android store has got millions of applications and games to download. However in Apple products some applications like Facebook, Twitter etc bind to the iOS to deliver maximum UI/UX.
Android offers open source platform which is a good point to consider for the developers. But Apple iOS is not open source. Also Android applications are developed using Java programming language for which there are lot of tutorials available on the internet. But Apple iOS applications are developed using Objective C which is considered a little tougher than Java.
Android is the winner
Smartphones powered by Android OS are available for very less price. But Apple products are very costly compared to Android powered smartphones.
Android is the winner
This error “[-5 – No address associated with hostname]” is very common while installing or updating packages in Ubnutu Linux which is due DNS. To solve this issue change the “Download from” option in Update Manger. Select the option which has IP address its name. Follow the below steps to correct the issue.
- Open Terminal. Type update-manager and hit Enter
- Click Settings button. Go to tab Ubuntu Software
- Click drop down Download From and select Other..
- Select any option that has IP address in its name. E.g. United States -> 220.127.116.11
- You can now successfully install or update packages.
I got this error “ActiveRecord::ConnectionNotEstablished” while using Ruby on Rails with MYSQL initially. The error means that the Rails framework is not able to connect to MYSQL server. The problem is that the root(MYSQL) user was not able to connect to MYSQL through Rails. So to solve this issue, login as root in MSQL and create a new MYSQL user and config Rails to use the new MYSQL user and password.
Create User MYSQL Command:
CREATE USER ‘user’@’localhost’ IDENTIFIED BY ‘password’;
Grant Access to Required Database to the New User:
GRANT ALL PRIVILEGES ON *.* TO ‘user’@’localhost’;
Note: The first * represents the database and second * represents the table name. *.* means that user is given access to all databases and its table. You can also give restricted access to a specific database by replacing *.* by database_name.*
Now use the new MYSQL user in config/database.yml file which solves the issue.
- Gem v1.8
- Ruby v1.9
- Rails v4.0.3
- MYSQL Server v5.5
- mysql2 gem in Rails
- Rails default web server (WEBrick)
This is a very common issue where we get error “Error installing mysql2: Failed to build gem native extension” while installing mysql2 gem in Rails(in Ubuntu Linux OS). The problem is due to missing libmysql(from MYSQL) file.
To solve the issue install the compnents libmysql-ruby and libmysqlclient-dev using the command sudo apt-get install libmysql-ruby libmysqlclient-dev (Run in Ubuntu Terminal). Then run gem install mysql2 which should run successfully.
Run the following command where we pass the location of MYSQL lib and include folder. Replace the PATH with the actual location of MYSQL Server application.
gem install mysql2 — ‘–with-mysql-lib=”PATH\MySQL Server 5.5\lib” –with-mysql-include=”PATH\MySQL Server 5.5\include”‘
There are a lot of posts out there to install Ruby on Rails in Linux and Windows which are not clear explained. The reason is that latest version of Ruby and Gem are causing some issues due to which we are not able to use Rails. So I have given simple steps to install Ruby on Rails in Ubuntu Linux.
- Install Ruby – sudo apt-get install ruby
- Use ruby -v to check for the version you are using.
- Configure system to use the Ruby version 1.9 – sudo update-alternatives –config ruby. Select which version to use.
- Install rubygem – sudo apt-get install rubygems
- Configure system to use the gem version 1.9- sudo update-alternatives –config gem. Select which version to use.
- Install Rails – sudo apt-get install rails
- MYSQL & Apache will be installed by default. If it is not installed use the following command to install it.
- Install MYSQL – sudo apt-get install mysql-server
- Install Nodejs – sudo apt-get install nodejs
- To install mysql2 gem, you need to install the following sudo apt-get install libmysql-ruby libmysqlclient-dev
- Check whether Rails is working – rails new app1
- Start the app – rails server inside app1 folder.
Note: This setup was tested in Ubuntu 12.04 LTS.