GithubHelp home page GithubHelp logo

Comments (7)

tbpg avatar tbpg commented on July 4, 2024

@frankyn, should this link point somewhere else?

See https://codelabs.developers.google.com/codelabs/cloud-app-engine-refinery-cms/index.html?index=..%2F..%2Fio2018#6 .

from ruby-docs-samples.

melom13 avatar melom13 commented on July 4, 2024

from ruby-docs-samples.

frankyn avatar frankyn commented on July 4, 2024

Yep, that's a bug, I missed fixing this link. There isn't a new link. An update to the codelab source to include the expected result to copy-paste it.

The instructions were to update the existing config/initializers/refinery/core.rb and add the following:

# Insert the following require statement at the top of core.rb
require "dragonfly/google_data_store"


# Find and uncomment the following two lines and set them as follows:
# with the following values.
config.dragonfly_custom_backend_class = "Dragonfly::GoogleDataStore"

config.dragonfly_custom_backend_opts = {
   project: ENV["GOOGLE_CLOUD_PROJECT"],
   bucket:  "#{ENV['GOOGLE_CLOUD_PROJECT']}-refinery-cms"
}

from ruby-docs-samples.

melom13 avatar melom13 commented on July 4, 2024

from ruby-docs-samples.

frankyn avatar frankyn commented on July 4, 2024

Full example in the mean time: (will follow-up to get it fixed on Qwiklabs)

# encoding: utf-8
require "dragonfly/google_data_store"
Refinery::Core.configure do |config|
  # When true will rescue all not found errors and display a friendly error page
  config.rescue_not_found = Rails.env.production?

  # When true this will force SSL redirection in all Refinery backend controllers.
  # config.force_ssl = false

  # Set the S3 options using means other than securely by environment variables.
  # If you have to.
  # config.s3_bucket_name = ENV['S3_BUCKET']
  # config.s3_region = ENV['S3_REGION']
  # config.s3_access_key_id = ENV['S3_KEY']
  # config.s3_secret_access_key = ENV['S3_SECRET']

  # When true will use Amazon's Simple Storage Service instead of
  # the default file system for storing resources and images
  config.s3_backend = config.s3_access_key_id.present? || config.s3_secret_access_key.present?

  # Use a custom Dragonfly storage backend instead of the default
  # file system for storing resources and images
  config.dragonfly_custom_backend_class = "Dragonfly::GoogleDataStore"
  config.dragonfly_custom_backend_opts = {
   project: ENV["GOOGLE_CLOUD_PROJECT"],
   bucket:  "#{ENV['GOOGLE_CLOUD_PROJECT']}-refinery-cms"
  } 

  # Whenever Refinery caches anything and can set a cache key, it will add
  # a prefix to the cache key containing the string you set here.
  # config.base_cache_key = :refinery

  # Site name
  # config.site_name = "Company Name"

  # This activates Google Analytics tracking within your website. If this
  # config is left blank or set to UA-xxxxxx-x then no remote calls to
  # Google Analytics are made.
  # config.google_analytics_page_code = "UA-xxxxxx-x"

  # Enable/disable authenticity token on frontend
  # config.authenticity_token_on_frontend = false

  # Should set this if concerned about DOS attacks. See
  # http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
  # config.dragonfly_secret = "c57576024a5a1bf0b8051ab8969f757536b199faac58bec7"

  # Register extra javascript for backend
  # config.register_javascript "prototype-rails"

  # Register extra stylesheet for backend (optional options)
  # config.register_stylesheet "custom", :media => 'screen'

  # Specify a different backend path than the default of "refinery".
  # Make sure you clear the `tmp/cache` directory after changing this setting.
  # config.backend_route = "refinery"

  # Specify a different Refinery::Core::Engine mount path than the default of "/".
  # Make sure you clear the `tmp/cache` directory after changing this setting.
  # config.mounted_path = "/"

  # Specify the order Refinery plugins appear in the admin view.
  # Plugins in the list are placed, as ordered, before any plugins not in the list.
  # config.plugin_priority = %w(refinery_pages refinery_images)
end

from ruby-docs-samples.

frankyn avatar frankyn commented on July 4, 2024

Being fixed by qwiklabs team and marking this closed. I updated the codelab linked to by @tbpg.

from ruby-docs-samples.

tbpg avatar tbpg commented on July 4, 2024

Thanks!

from ruby-docs-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.