For a client I have to build a CMS with my Rails 3.2.2 application. The thing is, the app is ready-to-go. Without the CMS, that is. I just have to implement a CMS, but when I tried to do that with RefineryCMS (following Refinery's own instructions), it didn't work, because Refinery didn't pick up the CSS and pages I had made.
What should I do? Is there another, useful CMS-plugin for an existing Rails app? Or should I build a CMS myself, with stuff such as omni-auth? If so, is there a tutorial around for building such a CMS?
Thanks a lot!
Have a look at copycopter it might fit your needs.
Related
I'm new to both Ruby on Rails and Locomotive CMS, but I'm just starting to create my first site with them.
I've got the engine running in a full Rails app (I'm going to need to deploy it on our own server later on). But it's just spitting out the 'Template' content defined through the admin interface, without any other template/content around it.
I can 'fix' it by shoving the html for the whole page in through this input field. But that's not right, surely? The Getting Started guide talks of putting the templates in the filesystem, at something like: Pages/index/first page. "All pages are inherited from index". I have an index.liquid under views/pages but it's not picking that up... (I've tried a couple of other locations too).
I'm sure this is a dumb question, but please could someone tell me where to put my template in the file system? Or how to point Locomotive to pick it up from the right place?
(I did get the file system liquid template working by defining it through the Rails way, with a route, a controller and adding a liquid template initializer I found here. But then it's missing the variables that should come from the CMS content).
I'm loading the site using bundle exec unicorn_rails. And I'm using Rails v3.2.13, Ruby v1.9.3 and Locomotive_cms v2.2.2.
Thanks!
I'm Didier from LocomotiveCMS.
LocomotiveCMS is a little bit different from the other CMS, in a sense, we offer a tool named Wagon to manage your site locally without having to install mongodb, rails and some other components.
Another huge benefit is that you can write your templates in HAML and your CSS in SASS/ SCSS or Less (we embedded Compass as well) and with our preferred texts editor (editing a whole site in a browser is a nightmare).
That's a nice eco-system in order to be super efficient when it comes to develop a LocomotiveCMS site.
Once you're done with your local work, you can deploy your site to a remote LocomotiveCMS engine in a similar way you push your application to Heroku. Actually, pushing a site will create the back-office for the final end user.
I suggest you to read that page.
http://doc.locomotivecms.com/guides/get-started/requirements
and this one too
http://www.locomotivecms.com/tour
Our message is still not clear on our official website but believe me, we are working to make it better.
Hope it will help you !
Didier
I am trying to use Spree with my RoR application. Ok, I do follow all those guides and FAQs on official website when I want to customize something. That's ok and no problem with it. One question, to which I could not find a clue -- how is that possible, that there is nothing in apps/view, apps/models folders, but it's still working? I mean, yes, I can create something in these folders and redefine the behavior of my views (actually, this is one of the ways of customization), but I really want to understand the internals. I am pretty new to Rails and got used to classic app folder structure.
what you are wondering about is the magic of Rails Engines.
Ruby on Rails allows you to define Engines (your app is one too) and when it looks for views/controllers/etc.. all mounted engines are part of the search path.
So the view is inside the Spree gem, not visible to you - but it still looks in there.
If you put something in your view folder with the same name, it will take precedence over the views in the Rails engine you have in the Gem.
Here is a good guide on how Engines work in Rails:
http://edgeguides.rubyonrails.org/engines.html
One good example of these Engines is the jQuery-rails Gem you probably use inside your Application.
It has no code at all (except for some fallbacks for Rails 3.0 and below that don't have an asset pipeline), but the jQuery.js file in the app/assets/javascripts folder. And since the engine is in the load path you can require the asset that's in there..
The engine itself has the same folder structure as your app (app/views, app/controllers ...)
You can look at the internal structure of Spree here: https://github.com/spree/spree/tree/master/core/app
I have been doing UI research and have come across admin templates at http://themeforest.net/. I was wondering how do you apply these onto a web app built on Rails. These templates look very similar to wordpress themes. Are they that easy to configure? Is it just as simple as setting up a link to the database to make the fields form capture data? I've been looking at this theme.
For admin templates I recommend using Active Admin. It's relatively easy to implement and gives you great admin screens with little effort.
Yes, You can. I'm trying to solve the same problem and so far I have a couple options:
1.) do it by hand, I've done this before, it works but takes a lot of time to truly understand how your theme is put together. First I would recommend using the included themes assets exactly as they are bundled with the theme. Don't assume that just because you have twitter-bootstrap-rails gem that the bootstrap classes in the theme will work. Link the assets statically and slowly extract out the static assets and replace them in the asset pipeline once you know they work.
2.) Use the strategy suggested in the install_theme gem (http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/) the gem itself is not maintained any longer (i'm not sure about any forks), but the strategy is sound. Extract the core parts of the template into partials.
The short answer is yes, but there is no straight forward way to "import to rails"
I need simple CMS to allow non-tech folks edit some static text in app I maintaing. App is in rails 3.2 and is multilingual. What would here fit best?
You might want to take a look at Refinery which is now a mountable engine. Version 2.0 has been released a few days ago.
There is also a bunch of other CMS, it all depend on your needs:
Locomotive. There is a 2.0.0.rc branch which is now a mountable engine. This looks promising with custom content type!!!
Comfortable Mexican Sofa (editorial: best CMS name, ever!)
Browser CMS
Radiant CMS
and a lot more...see most of them on Ruby-Toolbox
my suggestion is just add a WYSIWYG like CKeditor to text box. ckeditor gem
ps. rails it self can be a simple cms ... just rails g scaffold
tinyMCE will allow you to do images etc, but really if you're using rails for this stuff i would (and do), use tinyMCE for text then add paperclip to add the images and video (possibly also swfupload if the videos are big).
Then you can build your template as required and pull stuff in based on the page.id or other identified.
back to multilingual:
you'll want to model up 'my_cms_item' eg. news_item and 'my_cms_item_translation' e.g. 'news_item_translation' and create a 1-Many for these so that when a user creates a news_item they can select to add additional translations in whichever language and the system just detects and pulls if available. You can make it either hide the item or default to a translation as required.
I have a website that has product pages(dynamic) and corporate pages(fairly static). Both are coded in Rails. This means the marketing team has to involve the dev team to make any changes to the static pages. To address this issue, I am thinking about migrating the static pages to a CMS.
I am considering following approaches:
WordPress + Jekyll
Marketing team maintains the static pages at a private Wordpress site (eg: foo.wordpress.com).
When the marketing team is ready to deploy the change, a command line tool converts the WP pages to static pages using Jekyll and commits the changes to a git repository.
The changes to the git repository are uploaded to the Amazon S3 bucket associated with the raills application asset.
Marketing team is already familiar with WP and it is quite easy to find a good WP theming resource.
Rails based CMS : Locomotive/Radiant
The CMS resides within the rails app.
Has anybody done this type of deployment. In your opinion which approach is better of the two and why?
I prefer having the CMS integrated in with the Rails app. This way you only have one layout and set of stylesheets to maintain.
Finding a Rails based CMS that makes it easy to integrate into your own application and works the way you want it to might be a bit more challenging. Most of the ones I've seen, the CMS is the application and you have to use its hooks to customize things.
With that said, it isn't that hard to build a simple CMS to use within your own application. Wordpress uses tinymce as the wysiwyg, which isn't that hard to get working in a Rails app. Also, take a look at Refinery, as it may fit your needs just fine.