---
title: "linux rails 连oracle 注意事项"
author: "aroundworld2008"
date: "2008-08-14T16:24:41Z"
tags: ["Linux", "Oracle", "Rails", "Ruby"]
categories: ["数据库"]
slug: "linux-rails-oracle"
draft: false
lastmod: "2008-08-14T16:24:41Z"
id: 228053
url: "https://aroundworld2008.iteye.com/blog/228053"
---

今天试了一下，linux rails 连oracle 出现ora-12154错误，原因是rails 默认会在/etc/下找tnsnames.ora文件（/etc/tnsnames.ora），找不到则出下此错误，本人比较笨，直接把我window下tnsnames.ora 复制到此目录下，就解决了此问题，
另：
ruby-oci8 文档说，用instantclient  不要这个文件也行（我现在也是用instantclient），我怎么会有这个错误呢，不知道了！算了，懒得就去纠缠了！