zoukankan      html  css  js  c++  java
  • 结合使用 Oracle 和 Ruby on Rails 的补充

    本文是对此文的补充:

    结合使用 Oracle 和 Ruby on Rails

    http://www.oracle.com/technetwork/cn/tutorials/rubyrails-095981-zhs.html#t2

    1、ORACLEXE 下载:

    http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

    默认安装,记下sys system 密码 yulike

    安装 instantclient

    instantclient-basic-nt-12.1.0.1.0.zip
    instantclient-jdbc-nt-12.1.0.1.0.zip
    instantclient-odbc-nt-12.1.0.1.0.zip
    instantclient-sdk-nt-12.1.0.1.0.zip
    instantclient-sqlplus-nt-12.1.0.1.0.zip
    instantclient-tools-nt-12.1.0.1.0.zip

    2、下载并解压缩 rubyrails.tar 文件。运行压缩包中的 setup_ruby_hol.sql 创建数据库环境

    sqlplus sys/yulike@//127.0.0.1/XE as sysdba

    @setup_ruby_hol.sql

    按照提示输入:

    SQL> @setup_ruby_hol.sql
    Enter the Database Name ( Oracle SID):
    //127.0.0.1/XE
    Enter the DBA user:
    sys
    Enter the DBA password:
    yulike
    Enter the (new) user for this lab(user will be DROPPED and created):
    hol_hr
    Enter the password for the (new) user:
    hol_hr

    完成初始化。

    sqlplus hol_hr/hol_hr@//127.0.0.1/XE

    3、RUBY环境,随便下个rubystack 即可。

    然后还需要安装ruby-oci8

    gem sources --remove https://rubygems.org/
    gem sources -a https://ruby.taobao.org/
    gem sources -l

    gem install ruby-oci8 

    gem install activerecord-oracle_enhanced-adapter --prerelease

     (办公室使用了代理服务器: gem install ruby-oci8 -p http://10.104.17.70:3398

    4、对于ruby 1.9以后的版本,需要修改rubyrails.tar 压缩包中所有rb文件中的requere  'config.rb' 为 require_relative 'config.rb'

    ALL WILL BE FINE!

    d:Workspacesxe>ruby fetch.rb

    ================================================================================

    ID,NAME
    0.1E1,Europe
    0.2E1,Americas
    0.3E1,Asia
    0.4E1,Middle East and Africa
    --------------------------------------------------------------------------------

    5、百度网盘分析,有所有需要的文件。

    http://pan.baidu.com/s/1pJC8V3d

  • 相关阅读:
    Docker 部署 ElasticSearch-Head
    linux安装kibana-7.6.1
    CentOS部署ElasticSearch7.6.1集群
    linux 安装mysql 8
    Docker安装Mysql,并搭建一主一从复制集群,一主双从,双主双从集群
    linux 挂载光盘,rmp,yum
    git多账号登录问题
    js动态添加事件-事件委托
    yii2 RESTful api的详细使用
    yii2 ActiveRecord多表关联以及多表关联搜索的实现
  • 原文地址:https://www.cnblogs.com/likeyu/p/4595957.html
Copyright © 2011-2022 走看看