These are chat archives for locomotivecms/v3

7th
Jun 2016
brian-hill
@brian-hill
Jun 07 2016 01:59

I am having some trouble with routes in locomotive 3.1. After getting errors in rake routes with my app I created the "Install Locomotive Engine" example app (https://locomotive-v3.readme.io/docs/getting-started-with-locomotive) just to see if it was something I was doing incorrectly. I get the same errors in running rake routes with the example app. This is what I get:

Prefix Verb URI Pattern                    Controller#Action

locomotive /locomotive Locomotive::Engine
/locomotive(/:site_handle)/api #<Rack::Builder:0x007ff586b7a150 @warmup=nil, @run=Locomotive::API::Dispatch, @map=nil, @use=[#<Proc:0x007ff586b71a00@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86>, #Proc:0x007ff586b5d3e8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b46440@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86]>
/ #<Rack::Builder:0x007ff586b36e78 @warmup=nil, @run=#<Locomotive::Steam::Middlewares::Renderer:0x007ff586b2fb50 @app=nil>, @map=nil, @use=[#Proc:0x007ff586b369c8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b366d0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b36298@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b35f78@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b35d20@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b35a78@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b35690@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b352a8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b35118@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b34dd0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b34a60@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b348d0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b34510@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b341c8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b37c60@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2ff88@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fec0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fe20@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fd80@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fce0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fc18@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff586b2fb78@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86]>

Routes for Locomotive::Engine:
new_locomotive_account_session GET /sign_in(.:format) locomotive/sessions#new
locomotive_account_session POST /sign_in(.:format) locomotive/sessions#create
destroy_locomotive_account_session DELETE /sign_out(.:format) locomotive/sessions#destroy
locomotive_account_password POST /password(.:format) locomotive/passwords#create
new_locomotive_account_password GET /password/new(.:format)

rake routes error continued:
edit_current_site GET /:site_handle/current_site/edit(.:format) locomotive/current_site#edit
GET /:site_handle/current_site(.:format) locomotive/current_site#show
PATCH /:site_handle/current_site(.:format) locomotive/current_site#update
PUT /:site_handle/current_site(.:format) locomotive/current_site#update
DELETE /:site_handle/current_site(.:format) locomotive/current_site#destroy
preview /:site_handle/preview #<Rack::Builder:0x007ff582d0d278 @warmup=nil, @run=#<Locomotive::Steam::Middlewares::Renderer:0x007ff582ce7730 @app=nil>, @map=nil, @use=[#Proc:0x007ff582cfede0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfe778@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfe5c0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfdb98@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfd8c8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfd2b0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfcea0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cfc090@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cef840@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cef250@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cef048@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ceea58@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cee8a0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cedfb8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ceddb0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ced978@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ced7c0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ced3b0@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cec528@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582cec258@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ce7ac8@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86, #Proc:0x007ff582ce7988@/Users/brian/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:86]>
Am I doing something wrong? If so, how can I correct it?
Thanks, Brian
Arpsara
@Arpsara_twitter
Jun 07 2016 13:38
Hello! :) I'm totally new to LocomotiveCMS and need some help. :)
I managed to install a locomotive app on my own server, I managed to push a wagon template site too (but only for 1 user thanks to the api key and developer info), but can I propose several templates based on my wagon template when user is creating its website (like the locomotive cms demo)?
I have a lot of question, but if I could have an answer about this one, it would be a first step. Many thanks! :)
Didier Lafforgue
@did
Jun 07 2016 13:45
hi @Arpsara_twitter!
what you’re talking about is perhaps the main difference between the open source version of Locomotive and our hosting service.
that’s absolutely not rocket science
but it requires a couple extra scripts which are out of scope of Locomotive
basically, I’ve got a script which pulls site templates (Wagon sites) from github (http://github.com/locomotivecms/site-templates)
then, I’ve got another script which creates X sites (see that as creating a pool of free sites) and runs a “wagon deploy” for each of them.
all these deployed sites belong to a single user.
Didier Lafforgue
@did
Jun 07 2016 13:51
then, I coded a controller + views in my hosting rails application to list the different site templates. And when you select one of them what the app does is to change the ownership of the site (one of the pool) and transfer it to your account.
that’s only for demo purpose
for one of major downside is that if I modify a template, I’ve to drop the pool of sites and re-create it. This also means that sites using that template won’t get updated as well.
Arpsara
@Arpsara_twitter
Jun 07 2016 13:57
@did Thank you so much for you quickly reply. I checked the hire us section of the locomotive website but it's a blank page. ;)
Didier Lafforgue
@did
Jun 07 2016 13:58
@Arpsara_twitter where did you find the “hire us” link?
Arpsara
@Arpsara_twitter
Jun 07 2016 13:58
@did There are many links that go on a blank page
Didier Lafforgue
@did
Jun 07 2016 13:59
hmmm, okay, we need to fix that. thanks!
Arpsara
@Arpsara_twitter
Jun 07 2016 14:00
An other one here if you want: https://www.locomotivecms.com/comparison
brian-hill
@brian-hill
Jun 07 2016 18:17
Hi, I am trying to add a content entry via public submission. I'm doing a POST of json formatted data. The code I have written works in Locomotive version 2 but it fails in v3 and the response I get has all parameters set to nil and the error has "can't be blank" for each of the required params. Is there something that changed in the way public submission works between v2 and v3? What can I do to get this working? Thanks.