Anything Speaking Against the Bitnami.Org Ruby/Rails/Redmine Stack

Anything speaking against the bitnami.org Ruby/Rails/Redmine Stack?

I've been using it for the last 6 months with 0 issues.

Recommended.

rails is not internal or external team

Before running the commands shown on this page, you should load the Bitnami stack environment by clicking the shortcut in the Start Menu under "Start -> Bitnami APPNAME Stack -> Application console" (Windows). Learn more.

Also, take into account you should use bundle exec before your rails commands:

$ bundle exec rails --version
Rails 4.2.8

Starting with Redmine locally - how easy is migration to server later?

On your scale, I'd rate it close to a 9 or 10. It's not automatic, because aspects of the configuration may have to change (e.g. where your database is located, if it's not going to be localhost on the new machine). But it's pretty close -- you'd just upload your backed-up MySQL database to the new, remote instance once you're ready to make the move, and that's about it, except for the various other configuration and installation details that you can handle at the command line. But these will vary from host to host.

The only thing to worry about is that third-party providers may have specific restrictions on what kinds of plugins or settings can be active with a given Redmine install, but I suspect that in 95% of cases there won't be any issue here either.

Installing and running Redmine while having two different Ruby versions installed

You should use rvm if you want to have multiple rubies installed. rvm

With rvm installed, it is not difficult to run multiple applications on different ruby versions. With one caveat: phusion passenger can only run on one ruby at a time. But if, for example, your existing apps are running on passenger on 1.9.2, you can still run a mongrel for redmine on the same server running 1.8.7. Pretty much everything you need to know is on the page linked, above.

Ruby On Rails - Where would I look for the source function for render :partial = 'x' in a view?

I'm assuming that you would like to change the code for the partial itself, and just want to know where to find the template for that partial, not change the render method, which is part of Rails itself, as some of the other answers have suggested.

The render method tells Rails to render a particular template, possibly with some parameters passed in. A partial is a kind of template that is intended to render only a fragment of a page, such as an individual widget or a single section of the page. The syntax render :partial => "documents/form" is Ruby's way of passing keyword arguments to method; it is essentially just saying to render documents/form as a partial template. (In Ruby, this is actually equivalent to render({:partial => "documents/form"}), which is just invoking method render, passing in a hash table in which :partial, a keyword, maps to "documents/form", a string).

So, the code that will actually be rendered is the partial documents/forms. By convention, partials are loaded from files prefixed with _; and if you're using the default ERb template format, then they will likely end in .html.erb. As all view code is stored in app/views, you will probably be looking for app/view/documents/_form.html.erb. Yes, this is a not particularly obvious bit of convention, but that's Rails for you.

See the Rails Guide on partials and rendering for more information.

Error while running an rails application from command prompt

As the error message says:

For information about OpenSSL certificates, see bit.ly/ruby-ssl.

bit.ly/ruby-ssl points to http://railsapps.github.io/openssl-certificate-verify-failed.html which has the explanation for what is happening, and suggestions on how to fix it.

Changing https to http in source 'http://rubygems.org' is one of the recommended workarounds.

There is a windows specific solution at the bottom which recommends downloading a cacert.pem for RailsInstaller

how to configure a rails app (redmine) to run as a service on windows?

1. using webrick:

ref: http://www.redmine.org/boards/1/topics/4123

  • Download and install the Windows NT Resource Kit from
    http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

  • Create the service by running this command:

    path\INSTSRV.EXE your_service_name path\SRVANY.EXE

    in my case path is:

    "C:\Program Files\Windows NT Resource Kit\INSTSRV.EXE" redmine_webrick "C:\Program Files\Windows NT Resource Kit\SRVANY.EXE"

    could be also C:\Program Files\Windows Resource Kits\Tools\.

  • Run regedit (Start -> Run -> regedit)

    • Add the following registry key if it's not already there:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\your_service_name

    • Right click on this registry key and select New -> Key. Name it Parameters.

    • Add two values to the Parameters key. Right click on the parameters key, New -> String Value. Name it Application. Now create another one named AppParameters. Give them the following values:

      • Application: PathToRuby.exe, eg. C:\ruby\bin\Ruby.exe
      • AppParameters: C:\RUBYAPP\script\server -e production, where RUBYAPP is the directory that contains the redmine website.

      Example: C:\redmine\script\server -p 2000 -e production (-p indicates the port webrick will be listening to, and -e the environment used)

Now you can go to Administrative Tools -> Services. There you can start your service (the one with name your_service_name) and test whether or not it is working properly. It should be noted that the service will be marked as started prior to WEBrick finishing its boot procedure. You should give it 1min or so before trying to hit the service to verify that it is working correctly.

2. using mongrel:

ref: http://mongrel.rubyforge.org/wiki
ref: http://mongrel.rubyforge.org/wiki/Win32

first install mongrel and mongrel_service gem

gem install mongrel

gem install mongrel_service

then create the service

mongrel_rails service::install -N redmine_mongrel -c c:\redmine -p 3000 -e production

3. using thin:

References:

  • http://code.macournoyer.com/thin/
  • http://www.astarbe.com/es/trucos/windows/srvany_convierte_una_aplicacion_en_servicio

Instructions:

  1. First install thin (you'll need to install rack gem, if not already
    installed)

    gem install rack     
    gem install thin
  2. Follow the same steps indicated for webrick, but add another value named "AppDirectory". This is needed in order to avoid using c:\ruby\bin\thin.bat If I just pointed to the bat file, I couldn't stop the service.

    In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\redmine_thin\Parameters add the following keys:

    Application: c:\ruby\bin\ruby.exe

    AppDirectory: c:\redmine

    AppParameters: c:\ruby\bin\thin start -p 4000 -e production

------------------------------------------------------------------------------------------

You can control any of your service with the following commands:

net start redmine_xxx

net stop redmine_xxx

sc config redmine_xxx start= auto

sc config redmine_xxx start= auto dependency= MySql

sc delete redmine_xxx



Related Topics



Leave a reply



Submit