Forum: Ruby on Rails Permission denied on my windows xp sp2 development system

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mischka (Guest)
on 2007-07-21 03:36
(Received via mailing list)
Hello all,

I want to test rails on my development system. I use Eclipse with the
Aptana Rails Support. But when I start webrick and want to see the
aplication properties I get an Error.

Permission denied - ./script/../config/../tmp/sessions//ruby_sess.
6d3884b6a1a60c03.tmp or ./script/../config/../tmp/sessions//ruby_sess.
6d3884b6a1a60c03.new

or so. This is very stange because ruby_sess.6d3884b6a1a60c03.tmp
exist and an file with the name ruby_sess.6d3884b6a1a60c03
without .tmp. So the system has permissions.
I am Admin on thies maschine so the program has my privileges.

Please help me I am a rails noob.

mischka
mischka (Guest)
on 2007-07-22 21:31
(Received via mailing list)
Here are the log:

Permission denied - ./script/../config/../tmp/sessions//ruby_sess.
6d3884b6a1a60c03.tmp or ./script/../config/../tmp/sessions//ruby_sess.
6d3884b6a1a60c03.new

D:/Lang/ruby/lib/ruby/1.8/pstore.rb:333:in `rename'

D:/Lang/ruby/lib/ruby/1.8/pstore.rb:333:in `transaction'

D:/Lang/ruby/lib/ruby/1.8/cgi/session/pstore.rb:62:in `initialize'

D:/Lang/ruby/lib/ruby/1.8/cgi/session.rb:273:in `new'

D:/Lang/ruby/lib/ruby/1.8/cgi/session.rb:273:in `initialize'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/cgi_process.rb:123:in `new'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/cgi_process.rb:123:in `session'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/cgi_process.rb:155:in `stale_session_check!'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/cgi_process.rb:110:in `session'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/base.rb:1052:in `assign_shortcuts_without_flash'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/flash.rb:140:in `assign_shortcuts'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/base.rb:424:in `process_without_filters'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/filters.rb:624:in
`process_without_session_management_support'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/session_management.rb:114:in `process'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/base.rb:330:in `process'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:
41:in `dispatch'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:
113:in `handle_dispatch'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:
79:in `service'

D:/Lang/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'

D:/Lang/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'

D:/Lang/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:
63:in `dispatch'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59

D:/Lang/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'

D:/Lang/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:495:in `require'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:495:in `require'

D:/Lang/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:
39

D:/Lang/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'

D:/Lang/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'

./script/server:3

-e:4:in `load'

-e:4

I think ruby can'T rename the session file but why???
Bahadır D. (Guest)
on 2007-07-23 01:20
have you solved the problem? may you share the solution if you solved,
please?
Matthew Rudy J. (Guest)
on 2007-07-23 02:28
does the #{myapp}/tmp/sessions directory exist?
try creating it.

you should probably look at using database sessions anyway.
rake db:sessions:create should do that for you
then in /app/config/environment.rb uncomment the line about using
"ActiveRecordSessionStore" or something of that sort.
Kay P. (Guest)
on 2007-07-23 13:41
Matthew R. wrote:
> does the #{myapp}/tmp/sessions directory exist?
> try creating it.

the directory exists and in the sessiondir are files with .tmp and
without but no file with .new so I think ruby can create files but not
rename it. So ruby can't rename foo.tmp -> foo.new or so. And I don't
know why. can the Files be locked from the Filesystem(ntfs), but I think
I can not be the only own how has this prolem if this is the reason.

> you should probably look at using database sessions anyway.
> rake db:sessions:create should do that for you
> then in /app/config/environment.rb uncomment the line about using
> "ActiveRecordSessionStore" or something of that sort.

I will test is.
Kay P. (Guest)
on 2007-07-23 15:19
Kay Petzold wrote:
> I will test is.
ok I have test it and it works. But hits is only a workaround and don't
fix the Problem. Please help
Swe W. (Guest)
on 2009-05-22 13:43
Hi

I solved the problem by renaming the file. I tried to find out whether
the tmp/sessions directory exist or not. In that directory, I saw one
file (ruby_sess.a122324b45535c6556defg). I renamed this file into
ruby_sess. When I run my application, it works successfully. When I go
and look at that directory again, there is a new file
(ruby_sess.z56a768d89g00ghgl) created. I hope it will help you too.

swe




> Matthew R. wrote:
>> does the #{myapp}/tmp/sessions directory exist?
>> try creating it.
>
This topic is locked and can not be replied to.