开发者

Rails on Google App Engine - Error on OS X development machine

I'm running through the Ruby on Rails tutorial at http://guides.rubyonrails.org/getting_started.html (adjusting where appropriate for Google's App Engine). All is well up till section 6.3: when I try to click "New Post", I get the following error:

Internal Server Error (500)  
Request Method: GET  
Request URL: http://localhost:8080/500.html  
access denied (java.io.FilePermission /dev/urandom read)

It works fine when I upload the application to Google's App Engine; it's just on my development machine (OS X 10.6) that it doesn't work.

Thanks in advance.

EDIT: I've just tested a simplification to the problem: even when just running through the steps at gist.github.com/268192, I get the same error when clicking "new contact" (or similarly when navigating to localhost:8080/contacts/new).

Strangely, when I go through the steps for building a guestbook with Sinatra (code.google.开发者_开发百科com/p/appengine-jruby/wiki/GettingStarted) it works fine, including saving to the development store.


You have not setup your database in your development machine. do a rake db:create:all and then run a migration rake db:migrate


I suggest triple checking your routes.rb file to make sure you haven't got any errors in there.

Also, try jruby script/console and see if you can access the DB from there.

What version of JRuby are you on?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜