Author Topic: Ruby on Rails  (Read 7175 times)

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #15 on: October 22, 2008, 09:42:16 PM »
I'll give that a try tomm and let you know, seems like i screwed up lol.

Quote
RoR uses SQLite out of the box, why install and use that when the project will use MySQL?

if you're using migrations to build you database, which you should be using.  Rails is largely database independent. 

What do you mean by migrations? Also Rails may be mostly db independent but the actual site will be extremely db dependent. Infact the DB is really the only reason to be on the site. Am i overthinking it? In other words i havent been looking at Ruby or RoR for even 24 hours. So am i overthinking in the sense that RoR will handle every aspect of the website?

As i view it now, RoR is the site, and the DB is just holding and providing the data. And in that case, SQLite is not fit to handle such a massive amount of data (imo, anyway) whereas MySQL is. If im on the wrong path please slap me off it before i loose myself lol.

Appreciate the help. Been a while since i learned a completely new language.
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

webwhy

  • Jackass IV
  • Posts: 608
  • Karma: +15/-10
Re: Ruby on Rails
« Reply #16 on: October 22, 2008, 10:34:17 PM »
http://www.google.com/search?hl=en&q=rails+migrations&btnG=Google+Search&aq=f&oq=

depends on the requirements of the site.  rails wants to abstract the database away...which in a lot of cases is a very good thing...there are also situations where i wouldn't use mysql;  it lacks features found in db2, oracle and postgres that are necessary to make certain applications scale properly....proper transaction isolation, locking, etc

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #17 on: October 22, 2008, 10:47:34 PM »
MySQL is the only DB i know, really. I'll write up a basic idea of what im doing with the db and pm it to you in the morning and see what you think.

Thnx for the link
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #18 on: October 22, 2008, 10:49:08 PM »
Glancing at one of those search results i think im already doing it. I'm the only developer so i dont have a system in place for preventing me from making changes after others have, but i did install Subversion for tracking the project.
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #19 on: October 23, 2008, 11:25:16 AM »
There was no hits for mysql.cnf anywhere on the laptop...

netstat:

Quote
steve@CM-Laptop:~$ sudo /opt/lampp/lampp start
[sudo] password for steve:
Starting XAMPP for Linux 1.6.8a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
steve@CM-Laptop:~$ netstat --tcp --listening
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 *:mysql                 *:*                     LISTEN     
tcp        0      0 *:45771                 *:*                     LISTEN     
tcp        0      0 *:netbios-ssn           *:*                     LISTEN     
tcp        0      0 *:ftp                   *:*                     LISTEN     
tcp        0      0 localhost:ipp           *:*                     LISTEN     
tcp        0      0 *:microsoft-ds          *:*                     LISTEN     

steve@CM-Laptop:~$

mysqladmin:

Quote
steve@CM-Laptop:/$ mysqladmin -u lampp create demo_development
The program 'mysqladmin' is currently not installed.  You can install it by typing:
sudo apt-get install mysql-client-5.0
bash: mysqladmin: command not found
steve@CM-Laptop:/$

rake db:create (lampp is the root mysql user, no pw):

Quote
steve@CM-Laptop:~$ cd ~/Desktop/test/demo
steve@CM-Laptop:~/Desktop/test/demo$ rake db:create
(in /home/steve/Desktop/test/demo)
Couldn't create database for {"username"=>"lampp", "adapter"=>"mysql", "timeout"=>5000, "host"=>"localhost", "password"=>nil, "database"=>"demo__development"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)
steve@CM-Laptop:~/Desktop/test/demo$
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

webwhy

  • Jackass IV
  • Posts: 608
  • Karma: +15/-10
Re: Ruby on Rails
« Reply #20 on: October 23, 2008, 11:29:18 AM »
Quote
There was no hits for mysql.cnf anywhere on the laptop...

Sorry, can't help you with xampp...mysql is accepting TCP connections though...change the host directive to an ip address...(e.g. host: 127.0.0.1)

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #21 on: October 23, 2008, 11:33:04 AM »
you mean instead of localhost in the project db file right? I can try that.

Will my life, iyo, be easier if i scrap xampp completely for something else? Think you said lampp, which seems to be what xampp has built in or something (sudo /opt/xampp/lampp/lampp).
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #22 on: October 23, 2008, 11:38:27 AM »
127.0.0.1 offered the same result.
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

webwhy

  • Jackass IV
  • Posts: 608
  • Karma: +15/-10
Re: Ruby on Rails
« Reply #23 on: October 23, 2008, 11:48:08 AM »
i don't know if ditching xampp will help you...it will help me help you since i don't use xampp/lampp...whatever it is...

can you connect using mysql?

Code: [Select]
$mysql -u lampp -D demo_development

hans

  • Guitar Addict
  • Jackass In Charge
  • Posts: 3523
  • Karma: +46/-18
Re: Ruby on Rails
« Reply #24 on: October 23, 2008, 12:05:59 PM »
Xampp stores the mysql config in the mysql/bin folder of the xampp install. It's just called "my" at least on my windows install.

This signature intentionally left blank.

webwhy

  • Jackass IV
  • Posts: 608
  • Karma: +15/-10
Re: Ruby on Rails
« Reply #25 on: October 23, 2008, 12:12:29 PM »
Quote
It's just called "my" at least on my windows install

that's the name of the file...my.cnf, not mysql.cnf...i was mistaken in my earlier post

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #26 on: October 23, 2008, 12:17:57 PM »
Nope dont have it. I dont have a xampp folder, either. All i have is /opt/lampp per the install instructions. No my.cnf......

Quote
steve@CM-Laptop:~$ cd /opt/lampp
steve@CM-Laptop:/opt/lampp$ ls
backup   error   icons  libexec   modules         RELEASENOTES  tmp
bin      etc     lampp  licenses  phpmyadmin      sbin          var
cgi-bin  htdocs  lib    logs      phpsqliteadmin  share
steve@CM-Laptop:/opt/lampp$ cd bin
steve@CM-Laptop:/opt/lampp/bin$ ls
a2p              ldappasswd                    ora_explain
ab               ldapsearch                    pack_isam
apachectl        ldapwhoami                    pear
apr-1-config     libmcrypt-config              peardev
apreq2-config    libnetcfg                     pearize
apu-1-config     libpng12-config               pecl
apxs             libpng-config                 perl
autopoint        listaction                    perl5.10.0
bdftogd          listaction_d                  perl5.8.7
bsqldb           listfdb                       perlbug
bunzip2          listjpeg                      perlcc
bzcat            listmp3                       perldoc
bzdiff           listswf                       perlivp
bzgrep           listswf_d                     perror
bzip2            logresolve                    php
bzip2recover     lwp-download                  php-4.4.9
bzmore           lwp-mirror                    php-5.2.6
c2ph             lwp-request                   php-config
CA               lwp-rget                      php-config-4.4.9
CA.pl            makefdb                       php-config-5.2.6
captoinfo        Makefile.in                   phpize
CA.sh            makeswf                       phpize-4.4.9
c_hash           make_win_binary_distribution  phpize-5.2.6
checkgid         make_win_src_distribution     phptar
c_info           ming-config                   piconv
c_issuer         mp2bug                        pl2pm
clear            mp2doc                        pngtogd
c_name           msgattrib                     pngtogd2
comp_err         msgcat                        pod2html
config_data      msgcmp                        pod2latex
config.m4        msgcomm                       pod2man
corelist         msgconv                       pod2text
cpan             msgen                         pod2usage
cpan2dist        msgexec                       podchecker
cpanp            msgfilter                     podselect
cpanp-run-perl   msgfmt                        POST
crc32            msggrep                       prove
c_rehash         msginit                       psed
curl             msgmerge                      pstruct
curl-config      msgunfmt                      ptar
dbilogstrip      msguniq                       ptardiff
dbiprof          msql2mysql                    pwhich
dbiproxy         myisamchk                     raw2adpcm
dbish            myisam_ftdump                 replace
dbl2png          myisamlog                     reset
dbmmanage        myisampack                    resolveip
defncopy         my_print_defaults             resolve_stack_dump
der_chop         mysql                         rotatelogs
dprofpp          mysqlaccess                   s2p
enc2xs           mysqladmin                    sabcmd
envvars          mysqlbinlog                   sablot-config
envvars-std      mysqlbug                      shasum
find2perl        mysqlcheck                    showtable
freebcp          mysql_client_test             splain
freetype-config  mysql_config                  sqlite
ftpcount         mysql_convert_table_format    sqlite3
ftpdctl          mysql_create_system_tables    suexec
ftptop           mysqld_multi                  swftoperl
ftpwho           mysqld_safe                   swftophp
gd2copypal       mysqldump                     swftopython
gd2topng         mysqldumpslow                 tack
gdparttopng      mysql_explain_log             tdspool
gdtopng          mysql_find_rows               tic
GET              mysql_fix_extensions          toe
gettext          mysql_fix_privilege_tables    tput
gettextize       mysqlhotcopy                  tset
h2ph             mysqlimport                   tsql
h2xs             mysql_install                 unzzip
HEAD             mysql_install_db              webalizer
htcacheclean     mysql_secure_installation     webazolver
htdbm            mysql.server                  webpng
htdigest         mysql_setpermission           xgettext
htpasswd         mysqlshow                     xml2-config
httpd            mysql_tableinfo               xmlcatalog
httxt2dbm        mysqltest                     xmllint
infocmp          mysqltestmanager              xrpcomp
infotocap        mysqltestmanagerc             xslt-config
innochecksum     mysqltestmanager-pwgen        xsltproc
instmodsh        mysql_tzinfo_to_sql           xsubpp
isamchk          mysql_upgrade                 ysh
isamlog          mysql_upgrade_shell           zzcat
ldapadd          mysql_waitpid                 zzdir
ldapcompare      mysql_zap                     zzxorcat
ldapdelete       ngettext                      zzxorcopy
ldapmodify       openssl                       zzxordir
ldapmodrdn       openssl_fips_fingerprint
steve@CM-Laptop:/opt/lampp/bin$
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

hans

  • Guitar Addict
  • Jackass In Charge
  • Posts: 3523
  • Karma: +46/-18
Re: Ruby on Rails
« Reply #27 on: October 23, 2008, 01:57:03 PM »
the mysql config file is under
lampp/etc/

maybe make sure you don't already have mysql as part of your OS installation, they will compete with each other unless you change the ports in the Xampp/lampp install
This signature intentionally left blank.

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #28 on: October 23, 2008, 02:04:01 PM »
AHHHH....found it. And no mysql from ubuntu i declined all server apps initially.

Quote
.....
........
# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /opt/lampp/var/mysql/mysql.sock
skip-locking
...
......

So based on the sock error i was getting i should try specifying the socket for rails in the project db file, right?
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Ruby on Rails
« Reply #29 on: October 23, 2008, 02:10:25 PM »
ok i added the socket line for the project db, and the error changed:

"access denied for user ''@'localhost' to database 'demo__development'"

Betting its because rake still wont work:

steve@CM-Laptop:~/Desktop/test/demo$ rake db:create
(in /home/steve/Desktop/test/demo)
Couldn't create database for {"socket"=>"/opt/lampp/var/mysql/mysql.sock", "username"=>"lampp", "adapter"=>"mysql", "timeout"=>5000, "host"=>"localhost", "password"=>nil, "database"=>"demo__development"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)
steve@CM-Laptop:~/Desktop/test/demo$
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?