This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smehsan@localhost ~]$ cd | |
[smehsan@localhost ~]$ rails new railsp -d mysql | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/assets/javascripts/application.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smehsan@localhost ~]$ mkdir /var/run/mysqld | |
mkdir: cannot create directory ‘/var/run/mysqld’: File exists | |
[smehsan@localhost ~]$ touch /var/run/mysqld/mysqld.sock | |
touch: cannot touch ‘/var/run/mysqld/mysqld.sock’: Permission denied | |
[smehsan@localhost ~]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[smehsan@localhost one]$ rake db:create | |
#<Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13 "Permission denied")> | |
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock", "database"=>"one_development"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"} | |
(If you set the charset manually, make sure you have a matching collation) | |
#<Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13 "Permission denied")> | |
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock", "database"=>"one_test"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"} | |
(If you set the charset manually, make sure you have a matching collation) | |
[smehsan@localhost one]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[smehsan@localhost ~]$ cd Desktop | |
[smehsan@localhost Desktop]$ ls | |
App | |
[smehsan@localhost Desktop]$ cd App | |
[smehsan@localhost App]$ | |
[smehsan@localhost App]$ rails new two | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# We use preexec and precmd hook functions for Bash | |
# If you have anything that's using the Debug Trap or PROMPT_COMMAND | |
# change it to use preexec or precmd | |
# See also https://github.com/rcaloras/bash-preexec | |
# If not running interactively, don't do anything | |
case $- in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smehsan@smehsan:~/one$ rake db:migrate | |
== 20160526120711 CreateArticles: migrating =================================== | |
-- create_table(:articles) | |
rake aborted! | |
StandardError: An error has occurred, all later migrations canceled: | |
Mysql2::Error: Table 'articles' already exists: CREATE TABLE `articles` (`id` int(11) auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB | |
/home/smehsan/one/db/migrate/20160526120711_create_articles.rb:3:in `change' | |
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'articles' already exists: CREATE TABLE `articles` (`id` int(11) auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB | |
/home/smehsan/one/db/migrate/20160526120711_create_articles.rb:3:in `change' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-07-14T13:13:11.659258+00:00 app[web.1]: WHERE a.attrelid = '"articles"'::regclass | |
2016-07-14T13:13:11.653390+00:00 app[web.1]: Processing by ArticlesController#new as */* | |
2016-07-14T13:13:11.659258+00:00 app[web.1]: WHERE a.attrelid = '"articles"'::regclass | |
2016-07-14T13:13:11.659249+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "articles" does not exist | |
2016-07-14T13:13:11.659259+00:00 app[web.1]: ORDER BY a.attnum | |
2016-07-14T13:13:11.659261+00:00 app[web.1]: | |
2016-07-14T13:13:11.659262+00:00 app[web.1]: | |
2016-07-14T13:13:11.659254+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
2016-07-14T13:13:11.653390+00:00 app[web.1]: Processing by ArticlesController#new as */* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stock = {'apple': 10, 'banana': 20, 'orange':0 } | |
alreadyAte = ['ehsan'] | |
food = input('What food was eaten? ') | |
person = input('Who ate the food? ') | |
def menu(): | |
print("Press 1: To add stock. ") | |
print("Press 2: To check stock. ") | |
print("Press 3: To enter purchase. ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stock = {'apple': 10, 'banana': 20, 'orange':0 } | |
alreadyAte = ['ehsan'] | |
food = input('What food was eaten? ') | |
person = input('Who ate the food? ') | |
def menu(): | |
print("Press 1: To add stock. ") | |
print("Press 2: To check stock. ") | |
print("Press 3: To enter purchase. ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article id="post-<?php the_ID();?>" <?php post_class('t20-format-gallery'); ?>> | |
<header class="entry-header text-center"> | |
<?php if ( t20_get_attachment() ): | |
$attachments = t20_get_attachment(7); | |
?> | |
<div id="post-gallery-<?php the_ID(); ?>" class="carousel slide" data-ride="carousel"> | |
<div class="carousel-inner" role="listbox"> | |
<?php |
OlderNewer