CRUD Ruby on Rails Oracle database
A Create-Read-Update-Delete application may be developed with Ruby on Rails and Oracle database.
http://www.regdeveloper.co.uk/2006/07/03/ruby_rails_part1/
http://www.regdeveloper.co.uk/2006/07/17/ruby_rails_part2/
Hello Deepak,
Thanks a lot for this great content.
Feel feel to contact OTN editors if you want to publish new articles on Oracle Tech site.
Tugdual Grall
Similar Messages
-
Using Ruby on Rails -- No database update
Hi, All,
I'm trying to follow the instructions in the article called:
Using Ruby on Rails for Web Development on Mac OS X
I've installed everything according to the instructions and everything seems to work fine. However, I'm having a problem with the "rake migrate" command.
When I run it, it should add an accounts table, but it isn't adding the table. Here is the results of running the command:
[Daves-Computer:~/expenses] davep% rake migrate
(in /Users/davep/expenses)
[Daves-Computer:~/expenses] davep%
When, however, I run the command to revert to the previous version I get this:
[Daves-Computer:~/expenses] davep% rake migrate VERSION=0
(in /Users/davep/expenses)
== Accounts: reverting -- drop_table(:accounts)
rake aborted!
Mysql::Error: Unknown table 'accounts': DROP TABLE accounts
(See full trace by running task with --trace)
[Daves-Computer:~/expenses] davep%
So it looks to me like I'm accessing the database alright, but I'm not updating it with the new table.
Any ideas? If i'm being obtuse, let me know and I'll try to get you more details.
Thanks,
DaveHello Deepak,
Thanks a lot for this great content.
Feel feel to contact OTN editors if you want to publish new articles on Oracle Tech site.
Tugdual Grall -
Ruby on Rails with Oracle Database
I am starting a new project that needs to produce dynamic charts and data reports on the web. I am a Java programmer and new to databases. I have heard good things about Ruby on Rails but cannot get it to work with Mac OS X and our Oracle database. I've read many, many forum posts about the lack of an Intel Client from Oracle, but would really like to know how if its possible to
A) Get Ruby on Rails to read from an Oracle database AND
B) Find out how to configure Locomotive (the Ruby GUI I'm using) to connect to the Oracle database.
Thanks for any help!Hello Deepak,
Thanks a lot for this great content.
Feel feel to contact OTN editors if you want to publish new articles on Oracle Tech site.
Tugdual Grall -
Ajax with Ruby on Rails and Oracle Database
Ajax may be used with Ruby on Rails and Oracle database.
http://www.ftponline.com/channels/java/2007_02/dvohra/okay, that helped. Here's what I get:
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$ ls
comp_err mysql_zap
makesharedlibdistribution mysqlaccess
makewin_bindist mysqlaccess.conf
makewin_srcdistribution mysqladmin
msql2mysql mysqlbinlog
myprintdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysqlclienttest mysqldumpslow
mysql_config mysqlhotcopy
mysqlconvert_tableformat mysqlimport
mysqlcreate_systemtables mysqlmanager
mysqlexplainlog mysqlshow
mysqlfindrows mysqltest
mysqlfixextensions mysqltestmanager
mysqlfix_privilegetables mysqltestmanager-pwgen
mysqlsecureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysqltzinfo_tosql resolvestackdump
mysql_upgrade resolveip
mysqlupgradeshell safe_mysqld
mysql_waitpid
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$
How would I create a new database from here? -
Ruby on Rails Concurrent program registration in EBS 11i
hi everyone
I'm trying to see if it is possible to register a Ruby on Rails concurrent program in Oracle E-business Suite 11i applications. We have Ruby on the Rail program we are using to create a GL Daily Rates file into one of our Custom top directory. Our intention is to create a request set that includes this Ruby on Rails program and SQL*Loader program that loads the data into staging table before data is uploaded to the GL_Daily_Rates_Interface.
I have seen that the execution method for Ruby on Rails does not exist in 11i and have tried to use perl but without success.
Any help will be much appreciated.
Thanks in advance.
LeoThis is Oracle Application Server forum. Oracle Apps (EBS) forums are here:
http://forums.oracle.com/forums/category.jspa?categoryID=3 -
Help with Ruby on Rails and mysql - I just don't get the terminal...
Let me just start by saying I'm pretty new to using the terminal and unix commands. I've been trying to teach myself how to use Ruby on Rails (ror) over the pasy couple of days and have had some luck but I'm struggling with the terminal.
For instance, when starting a new ror project I need to use the terminal to creat a new database schema (I think this the right terminology) within mysql. The tutorials I'm using suggest that I use the terminal to create the database with a command like:
mysqladmin -u root -p create expenses_development
no matter how I try I cannot seem to find the way to make this work. I contunue to switch directories in the terminal, but am not getting anywhere. Can someone shed some light on where I could be going wrong?
thanks in advance
MacBook Pro Core 2 Duo 2.33 Mac OS X (10.4.8) 2 GB RAMokay, that helped. Here's what I get:
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$ ls
comp_err mysql_zap
makesharedlibdistribution mysqlaccess
makewin_bindist mysqlaccess.conf
makewin_srcdistribution mysqladmin
msql2mysql mysqlbinlog
myprintdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysqlclienttest mysqldumpslow
mysql_config mysqlhotcopy
mysqlconvert_tableformat mysqlimport
mysqlcreate_systemtables mysqlmanager
mysqlexplainlog mysqlshow
mysqlfindrows mysqltest
mysqlfixextensions mysqltestmanager
mysqlfix_privilegetables mysqltestmanager-pwgen
mysqlsecureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysqltzinfo_tosql resolvestackdump
mysql_upgrade resolveip
mysqlupgradeshell safe_mysqld
mysql_waitpid
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$
How would I create a new database from here? -
[SOLVED]Ruby on Rails won't run with apache/passenger
Hi I want to run Redmine, a Ruby on Rails application, on a personal server using MariaDB as the database and Apache with the Phusion Passenger module as the application platform. So far I am able to run Redmine with the default WeBrick server, but if I try to run it via Apache (http://192.168.1.5/redmine) I just get the directory index of /usr/share/webapps/redmine. I've been running various php webapps using this apache installation without issues but my unfamiliarity with Ruby on Rails makes me unsure how to fix this. If I create a Ruby on Rails test application as described at https://wiki.archlinux.org/index.php/Ru … figuration I get the same issue.
Using the arch wiki articles on Ruby on Rails and Redmine, This is basically how I installed things:
$ yaourt -S ruby1.9 rubygems1.9 nodejs redmine
# gem-1.9 install rails
# gem-1.9 install passenger
/opt/ruby-1-9/ and subfolders ended up having no read/exexute permissions for 'other', probably because of my umask settings, so I changed the permissions, also because apache runs as user/group 'apache'.
Ran the script that installs the passenger apache module:
# /opt/ruby1.9/bin/passenger-install-apache2-module
added to httpd.conf:
LoadModule passenger_module /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5
PassengerDefaultRuby /opt/ruby1.9/bin/ruby
ServerName arch-server
DocumentRoot /usr/share/webapps
<Directory "/usr/share/webapps">
# This relaxes Apache security settings.
AllowOverride all
Order allow,deny
Allow from all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
I checked if the passenger module is loaded, and judging from /var/log/httpd/error_log that seems the case:
[ 2013-07-03 22:52:22.8947 28902/b7407700 agents/Watchdog/Main.cpp:440 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nobody', 'default_python' => 'python', 'default_ruby' => '/opt/ruby1.9/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '28901', 'web_server_type' => 'apache', 'web_server_worker_gid' => '1001', 'web_server_worker_uid' => '1006' }
[ 2013-07-03 22:52:22.9120 28905/b73bd700 agents/HelperAgent/Main.cpp:555 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.28901/generation-0/request
[ 2013-07-03 22:52:22.9262 28902/b7407700 agents/Watchdog/Main.cpp:564 ]: All Phusion Passenger agents started!
[ 2013-07-03 22:52:22.9266 28910/b71dd700 agents/LoggingAgent/Main.cpp:271 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.28901/generation-0/logging
[Wed Jul 03 22:52:22 2013] [notice] Apache/2.2.24 (Unix) PHP/5.4.16 mod_ssl/2.2.24 OpenSSL/1.0.1e DAV/2 Phusion_Passenger/4.0.5 configured -- resuming normal operations
'apachectl configtest' gives 'Syntax OK'.
I followed the wiki on redmine (https://wiki.archlinux.org/index.php/Redmine), chose to use "bundle install" to install the required gems with only a 'production' environment. What worried me is that those gems are now in /root/.gems while the webserver runs as user 'apache'.
I can run Redmine at 192.168.1.5:3000 without errors using:
# ruby script/rails server webrick -e production
But if I kill it and try via apache http://192.168.1.5/redmine I get a directory content listing.
Last edited by rwd (2013-07-04 21:00:10)Thanks markocz, my use of sub-url was indeed the problem. With help from the linked article I did the following:
# mkdir /usr/share/webapps/phusion-passenger/
# ln -s /usr/share/webapps/redmine/public /usr/share/webapps/phusion-passenger/redmine
# chown -R root:http /usr/share/webapps/
# chmod -R g+rx /usr/share/webapps/
httpd.conf now looks like this:
LoadModule passenger_module /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5
PassengerDefaultRuby /opt/ruby1.9/bin/ruby
ServerName arch-server
DocumentRoot /usr/share/webapps/phusion-passenger
<Directory "/usr/share/webapps/phusion-passenger">
# This relaxes Apache security settings.
AllowOverride all
Order allow,deny
Allow from all
# MultiViews must be turned off.
Options +FollowSymLinks
</Directory>
RailsBaseURI /redmine
<Directory "/usr/share/webapps/phusion-passenger/redmine">
Options -MultiViews
</Directory>
Redmine now works via passenger.
Last edited by rwd (2013-07-04 20:59:40) -
Problem: fcgi with ruby on rails
hi!
i'm working on an application using an ajax based web frontend developed with ruby on rails.
with oracle apache's normal cgi this runs, but very slow (4+sec latency) compared to webricks.
does anyone have some pointers how to get fastcgi to work under these circumstances?
i'm looking for a solution on solaris.
thanks, corneliusHi,
can you provide some error messages from the logs? -
I have tried the Apple tutorial and Adam Blackbourne's book and website and still cannot get a functional environment started so that I can develop using Ruby on Rails. I get Ruby installed, Textmate installed, and then seem to get bogged down with Textmate and sql. I seem not to have mysql properly installed but I can't figure out what's wrong. Both these sources above refer to some great package call Locomotive that is "the golden path..." but it has been withdrawn by its author. Any ideas on how to proceed? What sources are available?
Hi,
I'm not sure what your stated problem is here? It seems you are describing problems with Ruby on Rails on Leopard and coincidentally with mysql based on the Apple tutorial; are these one problem or two? Please note that the tutorial is describing running mysql on server which is part of the 10.5 server package.
I have been running Rails 2.0.2 on Leopard client which I loaded following the tutorial (once I loaded Xcode 3 on the client as well). Since Rails 2.0 comes with sqlite3 as its default database, you can be up and running on 10.5 client in short order and save your mysql for deployment. In my case I also have 10.5 Server and have been testing with Rails and reverse proxies while operating in development mode (with sqlite3). When I start porting over to Server, mysql is a service on server and has a unique configuration. So the tutorial may not be applicable if you are using it with a mysql standard type install. You can read about the server install environment of mysql at
http://docs.info.apple.com/article.html?path=ServerAdmin/10.5/en/c6ws25.html
Actually, Ruby on Rails 2.0.2, TextMate and Ruby-Debug form a great environment for development. Not quite an IDE on 10.5 but almost there.
Hope this helps,
Harry -
Ruby on Rails and Dreamweaver 8
There were, at one time, Ruby on Rails extensions for
DreamweaverMX, created by Rob Cameron and referred to as
"RubyWeaver". Apparently, *those were the days*, because you can't
find them any where now!
Does anyone know how to use RonR with Dreamweaver? I am just
starting out. Too poor for ColdFusion and Flex. My only other
alternative, because I am on a Mac, is to use PHP - but I thought
RonR was better and faster at creating database-backed web
applications.
Thanks for taking the time to read this!There were, at one time, Ruby on Rails extensions for
DreamweaverMX, created by Rob Cameron and referred to as
"RubyWeaver". Apparently, *those were the days*, because you can't
find them any where now!
Does anyone know how to use RonR with Dreamweaver? I am just
starting out. Too poor for ColdFusion and Flex. My only other
alternative, because I am on a Mac, is to use PHP - but I thought
RonR was better and faster at creating database-backed web
applications.
Thanks for taking the time to read this! -
Does anyone know if its possible to integrate the Spry
Framework with Ruby on Rails?okay, that helped. Here's what I get:
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$ ls
comp_err mysql_zap
makesharedlibdistribution mysqlaccess
makewin_bindist mysqlaccess.conf
makewin_srcdistribution mysqladmin
msql2mysql mysqlbinlog
myprintdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysqlclienttest mysqldumpslow
mysql_config mysqlhotcopy
mysqlconvert_tableformat mysqlimport
mysqlcreate_systemtables mysqlmanager
mysqlexplainlog mysqlshow
mysqlfindrows mysqltest
mysqlfixextensions mysqltestmanager
mysqlfix_privilegetables mysqltestmanager-pwgen
mysqlsecureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysqltzinfo_tosql resolvestackdump
mysql_upgrade resolveip
mysqlupgradeshell safe_mysqld
mysql_waitpid
erik-petersons-computer:/usr/local/mysql/bin erikpeterson$
How would I create a new database from here? -
Connect mysql from with dreamweaver using ruby on rails
hi,
i just finish form my database using mysql front, but i begin
to do the interface uisng dreamweaver i find difficulties to
connect it with the database can someone tell how or tell about a
tutorial that talks about this.
notice: i am using ruby on rails
thanks a lothi,
i just finish form my database using mysql front, but i begin
to do the interface uisng dreamweaver i find difficulties to
connect it with the database can someone tell how or tell about a
tutorial that talks about this.
notice: i am using ruby on rails
thanks a lot -
I tried to follow the Ruby on Rails example post by Apple but it simply didn't work. I got the server started but the SQL migration didn't work. Has anybody made this work or been able to get through the "tutorial?"
Thanks. It is hard to describe exactly what doesn't work, but I will try. I get to the point in the tutorial where the server is up and running, I get Textmate running, but I keep having trouble with MySQL. I have installed MySQL 5.0.5 but at one point I got a screen that said I was using SQLite3. I think that came with some Apple package. I don't know how to "look at that particular section of the config/database.yml file." Nor how to modify it per the tutorial. "mysqladmin" commands generate an error message saying they can't be found. It seems that I have environmental issues. Of course, the "golden path installation guide," Locomotive, has been removed from circulation. So, I think that the tutorial assumes things will be done for you by installing Locomotive and that can't happen. I can't even get to the sample application.
Does this help in analyzing my problem? -
Here's the error message :
<hr />
Oracle/OCI libraries could not be loaded: libclntsh.so.10.1: cannot open shared object file: No such file or directory - /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/oci8lib.so
<hr />
When deploying the Rails app from mongrel, the app runs fine. But the app can't seem to connect to the oracle db when it is deployed via Phusion Passenger because it can't load the libclntsh.so.10.1 library. Googling for that error message brought us to a number of solutions and most of them has something to do with setting and exporting the $LD_LIBRARY_PATH from... well almost anywhere it can be set/exported to/from, which includes : a ruby wrapper, somewhere in environment.rb, inside the httpd.conf but none of them seems to fix the problem. We're kinda stumped here because we are can't really identify what's causing this problem.
FmagsipocThese two articles talk about deployment of Phusion Passenger + Rails + Oracle:
http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/
http://blog.rayapps.com/2008/05/21/using-mod_rails-with-rails-applications-on-oracle/
Make sure the path to Oracle Instant Client or Oracle Full Client libraries is added to LD_LIBRARY_PATH and the user running Apache has right access to it. -
TimesTen and Ruby on Rails?
Has anyone found a way to connect Ruby on Rails to TimesTen via a database adapter?
I don't know of a direct connection, however, I have used jRuby through the typical jdbc adapter with TimesTen
Maybe you are looking for
-
Can't send email in Windows Mail
On May 12th I was unable to send emails under Windows mail. It would come back with an error message of "0X800CCC0F". In my account I'm using (POP3) incoming.yahoo.verizon.net and (SMTP) outgoing.yahoo.verizon.net. My SMTP port is 25 and my POP3 p
-
How to use stored procedures in TestStand
I am trying to run a stored procedure but always get the error: Error executing substep 'Post'. The following SQL command failed: 'EXEC dbo.sp_test...' Native error code -2147217887 0x80040e21 Microsoft OLE DB Provider for SQL Server: Multiple-step O
-
In Aperture 3 and using File>Get Info, I'm told that many photos, which are 7+ Mb's are only One Mb or less. Are the full-sized masters held elsewhere, and if so how can I get to them. You've guessed I'm a newbie - just 2 months with Apple and I'm ve
-
Problems installing the Cloud. Any idea?
This is the end of the road. I've tried at least 5 times. I had no problems with the Cloud before, it worked wondrously well. My problem had the name Acrobat XI, there was an error when it was installed, I couldn't deinstall it. Adobe helped deinstal
-
bonjour je vous contact parce que j'ai acheté ce produit d'occasion mais je voudrais prendre un apple care mais il est enregistré sur l'ancien identifiant apple j'aimerai l'enregistré sur mon ID apple pour prendre un apple care merci