Thin Server Permission and Daemonizing Problems - redmine

I'm trying to deploy Redmine 2.x via Thin and have run into a couple of different problems. The first is, when testing via webrick I can successfully navigate Redmine anonymously. I can even login, however after submitting the form I receive an application error. Here is the production.log relevant parts:
Successful authentication for 'admin' from 97.79.126.223 at Fri Feb 01 00:14:04 UTC 2013
Redirected to http://54.235.144.11:3000/
Completed 302 Found in 67ms (ActiveRecord: 37.3ms)
NoMethodError (undefined method `options' for {:ctime=>1359677644, :user_id=>1, :atime=>1359677644}:Hash):
rack (1.5.1) lib/rack/session/abstract/id.rb:321:in `commit_session'
rack (1.5.1) lib/rack/session/abstract/id.rb:218:in `context'
rack (1.5.1) lib/rack/session/abstract/id.rb:212:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__750860825__call__4__callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.5.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.5.1) lib/rack/lock.rb:17:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.11) lib/rails/engine.rb:479:in `call'
railties (3.2.11) lib/rails/application.rb:223:in `call'
rack (1.5.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.5.1) lib/rack/handler/webrick.rb:60:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.5.1) lib/rack/handler/webrick.rb:14:in `run'
rack (1.5.1) lib/rack/server.rb:264:in `start'
railties (3.2.11) lib/rails/commands/server.rb:70:in `start'
railties (3.2.11) lib/rails/commands.rb:55
railties (3.2.11) lib/rails/commands.rb:50:in `tap'
railties (3.2.11) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
I've received this error both deploying with Thin and Webrick. I've never encountered this error with redmine before, regardless of how it is deployed.
The other problem I'm facing is how to start the thin servers. When I'm in the Rails directory and supply sudo thin start Thin successfully starts, however, if I try to start thin via sudo /etc/init.d/thin start I get this lovely error
>> Exiting!
/usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_unix_server': no unix-domain acceptor (RuntimeError)
from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_server'
from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:548:in `start_unix_domain_server'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/unix_server.rb:19:in `connect'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `start'
from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `send'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/bin/thin:6
from /usr/bin/thin:19:in `load'
from /usr/bin/thin:19
Here is my redmine.yml thin config file
servers: 3
chdir: /www/redmine.guidelinecentral.com
user: apache
log: /var/log/thin/redmine.log
daemonize: true
pid: /var/run/thin/redmine.pid
group: apahce
require: []
timeout: 30
wait: 30
max_persistent_conns: 100
socket: /var/run/redmine/sockets/thin.sock
max_conns: 1024
environment: production

I was not able to solve this issue and ended up doing a reinstall of both Thin and Redmine. I think there was a bad gem somewhere.

Related

ActionController::RoutingError (No route matches [GET] "/images/picture.jpg"):

I seem to have broken something in my rails 4.2 development environment. I went to change an image on one of my apps pages with another image I placed in the same location as the original, app/assets/images/picture.jpg but the new image won't render, and I can see in the source that unlike other images it's not being fingerprinted and still shows as picture.jpg in the source.
I'm not sure how to debug this and I haven't been able to find a working solution online. This is what prints in my rails server log:
Started GET "/images/picture.jpg" for ::1 at 2015-06-15 10:56:28 +0800
ActionController::RoutingError (No route matches [GET] "/images/picture.jpg"):
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:22:in `middleware_call'
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:13:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.1) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.1) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.1) lib/rack/lock.rb:17:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.1) lib/rack/sendfile.rb:113:in `call'
railties (4.2.0) lib/rails/engine.rb:518:in `call'
railties (4.2.0) lib/rails/application.rb:164:in `call'
rack (1.6.1) lib/rack/lock.rb:17:in `call'
rack (1.6.1) lib/rack/content_length.rb:15:in `call'
rack (1.6.1) lib/rack/handler/webrick.rb:89:in `service'
/home/me/.rbenv/versions/2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/me/.rbenv/versions/2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/me/.rbenv/versions/2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /home/me/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_trace.html.erb (1.0ms)
Rendered /home/me/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/routing_error.html.erb within rescues/layout (19.6ms)
Thanks for any help!
Alxs

Twilio Ruby SMS: undefined method `empty?'

I am trying to use twilio in a rails application. As part of the development I set up a simple controller using some hard-coded values (the input from the form that submits the POST request is, essentially, ignored). Here is the code of the controller:
class SmsController < ApplicationController
def send (dummy)
twilio_sid = "removed-for-privacy-reasons"
twilio_token = "removed-for-privacy-reasons"
twilio_phone_number = "removed-for-privacy-reasons"
number_to_send_to = "removed-for-privacy-reasons"
#twilio_client = Twilio::REST::Client.new twilio_sid, twilio_token
#twilio_client.account.sms.messages.create(
:from => twilio_phone_number,
:to => number_to_send_to,
:body => "This is a test of SendTextController"
)
end
end
The controller works fine - I am getting the hard-coded SMS at my mobile. However, I am getting the following exception at the web form:
undefined method `empty?' for Twilio::REST::SMS::Message:0x007f8df0e743b8
The full stack trace is here:
Application Trace | Framework Trace | Full Trace
twilio-ruby (3.12.2) lib/twilio-ruby/rest/instance_resource.rb:68:in `method_missing'
activesupport (4.1.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.1.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.5) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.5) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.5) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.5) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.5) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.5) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.5) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:678:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.5) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
activerecord (4.1.5) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.5) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.5) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.5) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.5) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.5) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.5) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.5) lib/rails/engine.rb:514:in `call'
railties (4.1.5) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/Users/nnikolo/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/nnikolo/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/nnikolo/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
There is another SO thread reporting a similar problem but none of the solutions offered there worked for me. Can you help?
Twilio Evangelist here.
This is really interesting.
First a quick side note: you are using the SMS resource, which is deprecated in favour of Messages. You should use the following:
#twilio_client = Twilio::REST::Client.new twilio_sid, twilio_token
#twilio_client.account.messages.create(
:from => twilio_phone_number,
:to => number_to_send_to,
:body => "This is a test of SendTextController"
)
Notice I removed the .SMS part of that.
Secondly, and I'll admit I can't fully explain the details, I strongly suspect using send as your action name is calling all kinds of chaos. #send comes form Object and here you're overriding it, but Rails uses it for various different callbacks on the controller. I notice you've added (dummy) to your signature, but Ruby doesn't support method overloading.
I don't know why, but it seems that may be the problem. I created a simple Rails 4.0.4 with exactly your controller, and I had a similar problem:
undefined method `compile' for #<Twilio::REST::SMS::Message:0x007fea132761e0>
Rails.root: ~/so26076867
Application Trace | Framework Trace | Full Trace
twilio-ruby (3.12.2) lib/twilio-ruby/rest/instance_resource.rb:68:in `method_missing'
activesupport (4.0.4) lib/active_support/callbacks.rb:369:in `__define_callbacks'
activesupport (4.0.4) lib/active_support/callbacks.rb:79:in `run_callbacks'
actionpack (4.0.4) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.4) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.4) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
My rails app doesn't have ActiveRecord, so that may explain the some of difference. But noticed that the top of our stack traces are both coming from the callbacks code in Rails. When I renamed the action to test_sms it worked:
def test_sms
twilio_sid = "xxxx"
twilio_token = "yyyy"
twilio_phone_number = "zzzz"
number_to_send_to = "...."
#twilio_client = Twilio::REST::Client.new twilio_sid, twilio_token
#twilio_client.account.sms.messages.create(
:from => twilio_phone_number,
:to => number_to_send_to,
:body => "This is a test of SendTextController"
)
end
I'd be interested to hear if this works for you. I've seen weird behaviour in Ruby and in Rails when accidentally naming a method send, it always seems to cause chaos. Exactly why you get this error, I'm not sure. This is probably breaking something in Rails. I'm going to look into this week and see if I can figure it out.
Let me know if this works, else I'll have another crack at it.
xmjw's answer nails it. I got the same advice from Alex Chan from Twilio's support. Xmjw's answer is, however, more comprehensive as it mentions the deprecated API version.
I need to mention that I copied the code of the controller from Twilio's own blog but I renamed for no particular reason the controller method to "send". The code produced "wrong number of arguments (1 for 0)" so I added a dummy parameter to the "send" method.
I followed the advice of Xmjw and Alex Chan and re-named the controller method. I used the name "send-text_message" which was used in the code snippet on Twilio's blog. I started getting "missing template" but this is not related to twilio. Putting
head :ok
at the end of the send_text_message method removed that error message. I got that from one of the replies at Template is missing.
In short - the code snippet on Twilio's blog is somewhat outdated but the replies of Xmjw and of twilio's Alex Chan sorted it out. It is really encouraging to see such good support for Twilio's API. I am really excited to work with it - thank you, guys!

Ruby on Rails Routing error while accessing form my local browser

I have the following error while I am viewing my webpages in browser.
book is my directory in that edit.erb is my view page
route.rb
LibrarySystem::Application.routes.draw do
get 'book#edit'
end
while I am accessing :3000/book/edit" it showing the following error
ActionController::RoutingError (No route matches [GET] "/book/edit"):
actionpack (4.0.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.3) lib/rails/rack/logger.rb`enter code here`:38:in `call_app'
railties (4.0.3) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.3) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.3) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.3) lib/rails/engine.rb:511:in `call'
railties (4.0.3) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.0ms)
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/routes/_table.html.erb (15.6ms)
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (62.5ms)
Your route is not defined correctly, I would recommend you to read through the commented out part of your routes.rb file for examples.
Oh well, I'll expand my answer. In your comment I can see you have some basic CRUD routes. The easiest way to define these routes is the following:
resources :books
Now check rake routes to see what routes are generated. You might not need them all, but you can set limitations through only or except. Example:
resources :books, except: [:show]
Now if you want a custom route for an individual book, you can add a member to your resources, like:
resources :books do
member do
post 'upvote'
end
end
Be aware though, if you want custom routes you should have an action with the same name, in this case upvote, defined in you controller.
If you want to set a route for a collection of books you can use collection instead of member. It is important to think about how your URLs should look like and if you want the route for either an individual book or a collection of books.
Calling routes for an individual book passes along the id of that book. Basic URL: ../book/1/edit. This is necessary for the controller, because you need the id params to work with. You can also make the URL more pretty by naming your route. Example:
get 'summary', to: 'books#show, as: :summary
Right, I can go on all day like this, but you should probably check the railsguides on this subject first.
Replace
LibrarySystem::Application.routes.draw do
get 'book#edit'
end
WITH
LibrarySystem::Application.routes.draw do
get 'book/edit'
end
You can define a shortcut route as get 'book/edit' which Rails can interpret correctly and map to book#edit plus create a named route as book_edit_path as mentioned below:
book_edit GET /book/edit(.:format) book#edit
Writing the route as get 'book#edit' would probably give you an error right at time you try to start the server or try to access a page(if it was already started):
ArgumentError (missing :controller):
That makes me believe that the scenario you shared is incorrect as defining your route as
get 'book#edit'
would not result in
ActionController::RoutingError (No route matches [GET] "/book/edit").

Rails ActionView::MissingTemplate error?

I've been at this for the better part of a day, was hoping someone more knowledgable than me could fix in two seconds.
I have a spree / rails app that is working fine on my local development box but on the server it keeps crashing with this error when I try to post to "/orders/populate".
It says MissingTemplate, can't tell if that's a warning or if that was in fact the fatal error. Anyway if I go to site.com/404 The page is working fine, I have this route get "404" => "pages#error404" that sends it to a working page.
I, [2014-02-25T06:33:01.693899 #18826] INFO -- : Started POST "/orders/populate" for 65.53.4.81 at 2014-02-25 06:33:01 +0100
I, [2014-02-25T06:33:02.142190 #18826] INFO -- : Processing by Spree::OrdersController#populate as HTML
I, [2014-02-25T06:33:02.147701 #18826] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"ChLxG3GWeEK8S31WdDdOZvVG9/9nsVVsQYzHuog6iZM=", "variants"=>{"6340"=>"1"}}
D, [2014-02-25T06:33:02.212119 #18826] DEBUG -- : Spree::User Load (5.1ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 4 ORDER BY "spree_users"."id" ASC LIMIT 1
D, [2014-02-25T06:33:02.543884 #18826] DEBUG -- : Spree::Preference Load (1.9ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/frontend_configuration/locale' LIMIT 1
D, [2014-02-25T06:33:02.580552 #18826] DEBUG -- : Spree::Order Load (7.0ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."user_id" = $1 AND "spree_orders"."completed_at" IS NULL AND "spree_orders"."created_by_id" = 4 ORDER BY created_at DESC LIMIT 1 [["user_id", 4]]
D, [2014-02-25T06:33:02.709049 #18826] DEBUG -- : Spree::Order Load (1.1ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 14 AND "spree_orders"."currency" = 'USD' LIMIT 1
D, [2014-02-25T06:33:02.780039 #18826] DEBUG -- : Spree::Adjustment Load (6.9ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (14) ORDER BY spree_adjustments.created_at ASC
D, [2014-02-25T06:33:02.785602 #18826] DEBUG -- : Spree::Order Load (1.2ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."number" IS NULL LIMIT 1
D, [2014-02-25T06:33:02.810045 #18826] DEBUG -- : (4.3ms) SELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = 'admin' [["user_id", 4]]
D, [2014-02-25T06:33:02.825458 #18826] DEBUG -- : Spree::Variant Load (4.6ms) SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."id" = $1 AND ("spree_variants".deleted_at IS NULL) LIMIT 1 [["id", "6340"]]
D, [2014-02-25T06:33:02.909932 #18826] DEBUG -- : Spree::LineItem Load (3.4ms) SELECT "spree_line_items".* FROM "spree_line_items" WHERE "spree_line_items"."order_id" = $1 ORDER BY created_at ASC [["order_id", 14]]
D, [2014-02-25T06:33:02.971996 #18826] DEBUG -- : (0.7ms) BEGIN
D, [2014-02-25T06:33:03.145149 #18826] DEBUG -- : Spree::Variant Load (1.7ms) SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."id" = $1 ORDER BY "spree_variants"."id" ASC LIMIT 1 [["id", 6340]]
D, [2014-02-25T06:33:03.164429 #18826] DEBUG -- : Spree::Product Load (4.8ms) SELECT "spree_products".* FROM "spree_products" WHERE "spree_products"."id" = $1 ORDER BY "spree_products"."id" ASC LIMIT 1 [["id", 6334]]
D, [2014-02-25T06:33:03.236665 #18826] DEBUG -- : Spree::TaxCategory Load (2.3ms) SELECT "spree_tax_categories".* FROM "spree_tax_categories" WHERE "spree_tax_categories"."id" = $1 AND ("spree_tax_categories".deleted_at IS NULL) LIMIT 1 [["id", 1]]
D, [2014-02-25T06:33:03.238493 #18826] DEBUG -- : (0.7ms) ROLLBACK
I, [2014-02-25T06:33:03.252370 #18826] INFO -- : Completed 500 Internal Server Error in 1104ms
F, [2014-02-25T06:33:03.256794 #18826] FATAL -- :
ActionView::MissingTemplate (Missing template home/toner/public/404 with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml, :rabl], :versions=>[:v1]}. Searched in:
* "/home/toner/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/spree_gateway-ab4dcb885418/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/spree_auth_devise-c27fac85b082/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.3/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_frontend-2.1.2/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_backend-2.1.2/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_api-2.1.2/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_core-2.1.2/app/views"
* "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/kaminari-0.14.1/app/views"
* "/home/toner"
* "/"
):
actionpack (4.0.0) lib/action_view/path_set.rb:46:in `find'
actionpack (4.0.0) lib/action_view/lookup_context.rb:115:in `find'
actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:27:in `block in determine_template'
actionpack (4.0.0) lib/action_view/lookup_context.rb:136:in `with_fallbacks'
actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:18:in `with_fallbacks'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:27:in `determine_template'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:8:in `render'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:23:in `render'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:127:in `_render_template'
actionpack (4.0.0) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:120:in `render_to_body'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
actionpack (4.0.0) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:97:in `render'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:40:in `render'
spree_core (2.1.2) lib/spree/core/controller_helpers/common.rb:57:in `block (2 levels) in render_404'
actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `call'
actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `respond_to'
spree_core (2.1.2) lib/spree/core/controller_helpers/common.rb:56:in `render_404'
activesupport (4.0.0) lib/active_support/rescuable.rb:81:in `call'
activesupport (4.0.0) lib/active_support/rescuable.rb:81:in `rescue_with_handler'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:15:in `rescue_with_handler'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:32:in `rescue in process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__891893256__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
It is looking for the 404.html in the public/ directory, make sure the file is there.

Vagrant crashes (Encoding::CompatibilityError) when trying to mount NFS shared folders

I'm using Vagrant 1.3.4 on OS X 10.8.5 with VirtualBox and found it to be painfully slow. Several sources suggested switching to NFS shares to improve performance, but when I add the :nfs => true bit in my Vagrantfile, I get the following fatal error during vagrant up (or vagrant reload):
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Mounting NFS shared folders...
/Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:284:in `block in write': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:284:in `each'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:284:in `write'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:322:in `block in write_string'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:319:in `each'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:319:in `write_string'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:55:in `block in from'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:47:in `step'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/buffer.rb:47:in `from'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/channel.rb:493:in `enqueue_pending_output'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/channel.rb:312:in `process'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:217:in `block in preprocess'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:217:in `each'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:217:in `preprocess'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:200:in `process'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:164:in `block in loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:164:in `loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/session.rb:164:in `loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.8/lib/net/ssh/connection/channel.rb:269:in `wait'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/communicators/ssh/communicator.rb:369:in `shell_execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/communicators/ssh/communicator.rb:64:in `block in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/communicators/ssh/communicator.rb:154:in `connect'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/communicators/ssh/communicator.rb:63:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/communicators/ssh/communicator.rb:95:in `sudo'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/guests/linux/cap/mount_nfs.rb:30:in `block (2 levels) in mount_nfs_folder'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/retryable.rb:17:in `retryable'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/guests/linux/cap/mount_nfs.rb:29:in `block in mount_nfs_folder'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/guests/linux/cap/mount_nfs.rb:10:in `each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/guests/linux/cap/mount_nfs.rb:10:in `mount_nfs_folder'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/guest.rb:139:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/guest.rb:139:in `capability'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/nfs.rb:93:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/prune_nfs_exports.rb:15:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/provision.rb:54:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:57:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/machine.rb:147:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/commands/reload/command.rb:33:in `block in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/plugin/v2/command.rb:185:in `block in with_target_vms'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/plugin/v2/command.rb:183:in `each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/plugin/v2/command.rb:183:in `with_target_vms'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/commands/reload/command.rb:32:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/cli.rb:38:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/environment.rb:478:in `cli'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.4/bin/vagrant:96:in `<top (required)>'
from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
Is there something I'm missing that should make this work?