Reza Primardiansyah
2007-Jan-08 13:14 UTC
[Masterview-users] Help about publish without gem
Jeff, How can I publish my site on a server that don''t have masterview gems? Any hints? Thanks in advance __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
You just need to install a copy of the masterview plugin in your rails app. There''s instructions on the standard ways to do this in the Installation documentation: http://masterview.org/installation.html#install_plugin ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Reza Primardiansyah Sent: Monday, January 08, 2007 5:15 AM To: masterview-users at rubyforge.org Subject: [Masterview-users] Help about publish without gem Jeff, How can I publish my site on a server that don''t have masterview gems? Any hints? Thanks in advance
Reza, There are several ways to do this. First, you can use the plugin version of MasterView which doesn''t require any gems. We release it in two forms for just that reason. To install the complete version as a plugin you do the following cd toyourrailsapp ruby script/plugin install svn://rubyforge.org/var/svn/masterview/tags/masterview This will install the latest release version of masterview. You could also change this url to pull other versions, but typically the latest release version is what you want. That''s it. Everything should work as you would expect. Note that the MasterView admin screens are by default secured to only be available in dev mode and when accessed from localhost, so you won''t be able to get to them on a remote host, but not a big deal if you do development elsewhere and then just deploy to remote server. We are planning on making this security a little more configurable when we have a chance. or Another option is to have MasterView generate the rhtml and then just deploy that to the server, nothing else would be needed. To do that you change the config/masterview/settings.rb generate_rhtml_files setting to true and then copy the generated rhtml to your other server. More details are in http://masterview.org/configuration.html#mv_rails_app_options The only disadvantage of this option is that it is a little more messy having all of the rhtml files to deal with and copy around. So it is your preference, either way will get you there. Jeff On 1/8/07, Reza Primardiansyah <reza_prima77 at yahoo.com> wrote:> > Jeff, > How can I publish my site on a server that don''t have > masterview gems? Any hints? > > Thanks in advance >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070108/a85eda6f/attachment.html
Reza Primardiansyah
2007-Jan-09 08:27 UTC
[Masterview-users] Help about publish without gem
Jeff and Deb, I downloaded the tarball plugin and extracted to vendor/plugins but it still show error. Below is the extract from the log file. Can you give me hint about what I''m doing wrong? Additional facts: - My shared hosting use plain CGI. - rake -T don''t show mv related tasks. - accessing http://<site>/masterview/ results "MasterviewController: missing default helper path masterview_helper" in log ActionController::MissingTemplate (Missing template ../config/../app/views/barang/list.rhtml): /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:1034:in `assert_existence_of_template_file'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:724:in `render_file'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:648:in `render_with_no_layout'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/layout.rb:253:in `render_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:942:in `perform_action_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process_pre_mv'' /vendor/plugins/masterview_plugin-0.3.1/lib/masterview/rails_ext/action_controller_reparse_checking.rb:24:in `process'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'' dispatch.cgi:10 Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) --- Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> Reza, > > There are several ways to do this. > > First, you can use the plugin version of MasterView > which doesn''t require > any gems. We release it in two forms for just that > reason. To install the > complete version as a plugin you do the following > > cd toyourrailsapp > > ruby script/plugin install >svn://rubyforge.org/var/svn/masterview/tags/masterview> > This will install the latest release version of > masterview. You could also > change this url to pull other versions, but > typically the latest release > version is what you want. > > That''s it. Everything should work as you would > expect. Note that the > MasterView admin screens are by default secured to > only be available in dev > mode and when accessed from localhost, so you won''t > be able to get to them > on a remote host, but not a big deal if you do > development elsewhere and > then just deploy to remote server. We are planning > on making this security a > little more configurable when we have a chance. > > > or > > > Another option is to have MasterView generate the > rhtml and then just deploy > that to the server, nothing else would be needed. To > do that you change the > config/masterview/settings.rb generate_rhtml_files > setting to true and then > copy the generated rhtml to your other server. More > details are in >http://masterview.org/configuration.html#mv_rails_app_options> > The only disadvantage of this option is that it is a > little more messy > having all of the rhtml files to deal with and copy > around. > > So it is your preference, either way will get you > there. > > Jeff > > On 1/8/07, Reza Primardiansyah > <reza_prima77 at yahoo.com> wrote: > > > > Jeff, > > How can I publish my site on a server that don''t > have > > masterview gems? Any hints? > > > > Thanks in advance > > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/masterview-users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
>> accessing http://<site>/masterview/ results in errorIn the standard configuration, the Masterview admin pages are only enabled in a development environment - the enable_admin_pages config setting is off in production mode. If you turn that option on in your production config, you currently also need to override the authorization check in the MasterviewController class, which by default only allows connections from the local host. This is a security consideration - the admin pages are a developer feature and not generally appropriate to expose on a public site. We intend to make this access check configurable as well, but for the moment you''ll need install an override in the authorization check to hook in your own policy, e.g., checks based on a user auth mechanism you''ve created for your site. ~ Deb # the admin pages restrict access using before-filter :check_authorization class MasterviewController < ApplicationController # Default implementation of authorization check # to restrict access to administrative services def allow_access? # a more general solution might look something like: # current_user && user_has_perm?(''mv-admin'') # backstop: only allow for developer testing on local machine local_request? end end
Reza Primardiansyah
2007-Jan-10 02:04 UTC
[Masterview-users] Help about publish without gem
Thanks Deb, But can you give me a hint about the main problem? Apparently it found that the rhtml file doesn''t exist but didn''t regenerate it. Thanks in advance --- Deb Lewis <djlewis at acm.org> wrote:> >> accessing http://<site>/masterview/ results in > error > > In the standard configuration, the Masterview admin > pages are only enabled > in a development environment - the > enable_admin_pages config setting is off > in production mode. > > If you turn that option on in your production > config, you currently also > need to override the authorization check in the > MasterviewController class, > which by default only allows connections from the > local host. This is a > security consideration - the admin pages are a > developer feature and not > generally appropriate to expose on a public site. > > We intend to make this access check configurable as > well, but for the moment > you''ll need install an override in the authorization > check to hook in your > own policy, e.g., checks based on a user auth > mechanism you''ve created for > your site. > > ~ Deb > > # the admin pages restrict access using > before-filter :check_authorization > class MasterviewController < ApplicationController > > # Default implementation of authorization check > # to restrict access to administrative services > def allow_access? > # a more general solution might look something > like: > # current_user && user_has_perm?(''mv-admin'') > # backstop: only allow for developer testing on > local machine > local_request? > end > > end > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/masterview-users>__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Reza - I wasn''t able to identify your problem from the original stack trace - masterview shows up in the rendering process, so the plugin was indeed installed and got itself hooked into the rails rendering in order to handle .html templates. If your app''s not too big, send me (off the list) a snapshot of your app and config directories and some context about what page/action was being processed and I''ll see if I can figure out what''s happening so you can get un-stuck. ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Reza Primardiansyah Sent: Tuesday, January 09, 2007 6:05 PM To: masterview-users at rubyforge.org Subject: Re: [Masterview-users] Help about publish without gem Thanks Deb, But can you give me a hint about the main problem? Apparently it found that the rhtml file doesn''t exist but didn''t regenerate it. Thanks in advance
Reza Primardiansyah
2007-Jan-12 13:33 UTC
[Masterview-users] Help about publish without gem
Deb, I can give you complete source code. tarball perhaps. But the model is in Indonesian language but I think it is nothing to worry about. I developed with gem version, uploaded it, removed all masterview files from vendor/plugin and config, then install the plugin version of masterview from tarball I downloaded from rubyforge. The plugin version don''t need config/masterview/* right? I had problem with them exist because mv tried to require ''masterview'' (the gem version it seems) --- Deb Lewis <djlewis at acm.org> wrote:> Reza - I wasn''t able to identify your problem from > the original stack trace > - masterview shows up in the rendering process, so > the plugin was indeed > installed and got itself hooked into the rails > rendering in order to handle > .html templates. > > If your app''s not too big, send me (off the list) a > snapshot of your app and > config directories and some context about what > page/action was being > processed and I''ll see if I can figure out what''s > happening so you can get > un-stuck. > > ~ Deb > > -----Original Message----- > From: masterview-users-bounces at rubyforge.org > [mailto:masterview-users-bounces at rubyforge.org] On > Behalf Of Reza > Primardiansyah > Sent: Tuesday, January 09, 2007 6:05 PM > To: masterview-users at rubyforge.org > Subject: Re: [Masterview-users] Help about publish > without gem > > Thanks Deb, > But can you give me a hint about the main problem? > Apparently it found that the rhtml file doesn''t > exist but didn''t regenerate > it. > > Thanks in advance > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/masterview-users>____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
On 1/12/07, Reza Primardiansyah <reza_prima77 at yahoo.com> wrote:> > Deb, > I can give you complete source code. tarball perhaps. > But the model is in Indonesian language but I think it > is nothing to worry about. > I developed with gem version, uploaded it, removed all > masterview files from vendor/plugin and config, then > install the plugin version of masterview from tarball > I downloaded from rubyforge. The plugin version don''t > need config/masterview/* right? I had problem with > them exist because mv tried to > require ''masterview'' > (the gem version it seems) > >Both plugin and gem version can use the settings in config/masterview if they exist, but they are not necessary for operation if you want the default settings. However it sounds like there is an issue with MasterView loading in your environment based on the fact that you had errors when config/masterview existed. Can you restore your config/masterview and give us the errors (stack trace) you get when require happens? That might help. And if you want to gzip up the rest of your app then we can try debugging with all your code. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070112/ea6f038a/attachment.html