Install Infopark Rails Connector in order to access and display CMS content directly from your Rails application.
The following instructions refer to Infopark Rails Connector, version 6.7.3 upwards. Instructions for installing previous versions can be found in the corresponding manuals (PDF). For information about updating from an earlier version of Rails Connector to the current version, please contact Infopark Customer Service.
$ cd myProject
license.xml
, to the config
directory underneath the project directory.database.yml
file needs to contain the proper definition of the CMS Fiona database:
cms: adapter: mysql database: MyFionaDB username: MyFionaDB-Read-User password: MyFionaDB-Read-User-Password socket: /var/run/mysqld/mysqld.sockA database user with read-only access should be used for the connection to the Fiona database.
Gemfile
:
gem 'mysql2' gem 'infopark_rails_connector', '~> x.y.z' gem 'infopark_fiona_connector', '~> x.y.z'Install the additional software using
bundler
:
$ bundle install
$ rails generate rails_connector:install create config/initializers/rails_connector.rb create app/models/obj.rb create config/local/configuration.rb append app/assets/javascripts/application.js gsub app/assets/stylesheets/application.css remove public/index.html remove app/assets/images/rails.png gsub app/views/layouts/application.html.erb gsub app/views/layouts/application.html.erbThis command integrates the required CSS files included in the gem into
app/assets/application.css
. Furthermore, JavaScript files are integrated into app/assets/application.js
. Furthermore, config/initializers/rails_connector.rb
as well as config/local/configuration.rb
are created. The Rails Connector uses the jQuery JavaScript library for creating and handling edit markers, comments, and ratings. This library is installed automatically.config/initializer/rails_connector.rb
initializer file you can adapt the modes of operation of the Rails Connector. In case you are using a CMS instance name other than default
, provide the correct instance name by modifying the following line in the initializer:
RailsConnector::Configuration.instance_name = 'instance_name'By means of the
configuration.rb
file, the Rails project can be adapted to your local development environment.$ rails sThe server will be available for browsing at
http://localhost:3000
.$ gem server
http://localhost:8808/
) and navigate to infopark_rails_connector
or infopark_fiona_connector
. More information on running a gem server is available on the RubyGems site.