# Problem that study rails on leopard

**URL:** <https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012>\
**Category:** Rails\
**Created:** [February 24, 2008, 8:20am UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012 "2008-02-24T08:20:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 24, 2008, 8:20am UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/1 "2008-02-24T08:20:45Z")

</div>

hi, guys:

```
i'm Writing Depot app on Mac OS X(10.5.2 Leopard) using bash, when

```

running a db migrate to create product table, and i get this error:

rake aborted!  
Mysql::Error: Can’t create/write to file  
‘/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql\_1f4\_0.MYI’  
(Errcode:  
13): SHOW FIELDS FROM products

```
Anyone knows this reason and tell me how to solve it, thinks
```

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 24, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/2 "2008-02-24T15:32:32Z")

</div>

Venture Lee wrote:

> rake aborted!  
> Mysql::Error: Can’t create/write to file  
> ‘/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql\_1f4\_0.MYI’  
> (Errcode:  
> 13): SHOW FIELDS FROM products
> 
> ```
> Anyone knows this reason and tell me how to solve it, thinks
> 
> ```

It appears that your mysql can’t access it’s own storage files, check  
permissions on the folders and make sure that the account that mysql is  
using has write permissions to that folder…

Perhaps reinstalling mysql will solve the problem

hth

ilan

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 24, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/3 "2008-02-24T21:18:25Z")

</div>

Venture Lee wrote:

> Mysql::Error: Can’t create/write to file  
> ‘/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql\_1f4\_0.MYI’  
> (Errcode:  
> 13): SHOW FIELDS FROM products

This area (/var/folders) contains a number of files related to running  
applications. In this particular case, it looks like some temporary  
storage for MySQL. Was MySQL installed as an admin user? Is it set to  
start up on boot or do you start it manually?

The /var/folders area is a protected area and, in general, only  
applications running with admin rights will be able to use it so MySQL  
must be setup from an admin user account.

My recommendation would be to stop the MySQL service (from System  
Preferences), re-install the package as an admin user, setting it  
running (from the admin account) and try again.

Some people have had success by just giving all users on the machine  
full read/write access to /var/folders (as admin user: sudo chown -R  
a+rw /var/folders), but this should be a last resort as it may open up  
your machine to other problems.

Try searching the internet for references to this directory (especially  
on Apple support sites).

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 24, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/4 "2008-02-24T20:16:26Z")

</div>

I would say your MySQL installation is screwed up somehow. That  
folder looks not normal. How did you install Rails and MySQL?

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 26, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/5 "2008-02-26T15:00:26Z")

</div>

i have seloved this problem, add parameter --user=root to start mysql

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [February 25, 2008, 2:43am UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/6 "2008-02-25T02:43:48Z")

</div>

thanks all, i’m a newbie with leopard, and i download mysql from  
[www.mysql.com](http://www.mysql.com) (mysql-5.1.23.dmg), and install it by a normal user, then  
su  
to root user, run the script  
“/usr/local/mysql/support-files/mysql.server  
start” to start mysql server, i don’t know this way correctly or not,  
and  
if i was wrong, what should i do? thanks very much~

On Mon, Feb 25, 2008 at 4:18 AM, Mark B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![liwenqiu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Post date:** [March 20, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/problem-that-study-rails-on-leopard/130012/7 "2008-03-20T15:09:31Z")

</div>

Can you please tell me, where did you add this parameter?
