Redmine Icalendar export issue in mac - ruby-on-rails

I am facing some issues when try to install following plugin in mac os.
It is working fine in linux as well as in windows.
https://github.com/thegcat/redmine_ical
Steps I followed:
After copying plugin files in vendor/plugin folder. Redmine stops working and shows "We're sorry but something went wrong" error message.
I am using bitnami-redmine-1.4.7-2-osx-x86_64-installer.dmg and when I remove Gemfile and require dispatcher from init.rb It starts running but doesn't show Ical on calendar page.

After copying plugin file we need to run "bundle install" command from terminal.
In bitnami stack redmine after copying plugin file,
1) $cd install dir
2) $./use_redmine
3) $bash: cd root_dir
4) bundle install
This will work .

The accepted answer didn't work for me, but did help me one step.
I had to do the following to make it work succesfully:
cd installdir/apps/redmine/htdocs
bundle install --without development test postgresql sqlite --no-deployment
bundle install --without development test postgresql sqlite --deployment
ruby bin/rake redmine:plugins RAILS_ENV=production
This all in addition to (or actually from within) using the "use_redmine" bash from the install dir.
I've opted to go for the other ical plugin, that didn't require the patchfiles (https://github.com/buschmais/redmics)
https://docs.bitnami.com/installer/apps/redmine/#how-to-install-the-redmine-agile-plugin

Related

'bundle is not installed' error

I am not good with devops. I had created a user called deploy. Previously I could ssh into my server then
su deploy
and run
RAILS_ENV=production bundle exec rails c
.
Some days ago, I completely forgot that I had a user called deploy. Being the root user, I installed ruby using rvm. RVM was already installed.
Now I remember that I have a user called deploy. I ran su deploy then ran
RAILS_ENV=production bundle exec rails c
I got the following error
The program 'bundle' is currently not installed. To run 'bundle'
please ask your administrator to install the package 'ruby-bundler'
Before I had installed ruby in super admin env I could run bundle in the deploy user env.
Is there a way to fix this?
PS: My capistrano deployment script is running without any problem even if it is being deployed by the "deploy" user
The problem is that when you ssh into the directory, at the directory, no .ruby-version file exists, so it use the default ruby version(run which ruby to see the exactly path), not the rvm ruby version, so it can't find the installed gems like bundler.
It's a environment problem.The capistrano deployment is working because you have assign ruby version in your deploy.rb like
set :rvm_ruby_version, 'ruby-2.2.2#zhitaotao'
so it can find correct ruby version, then find installed gems for the version.
The solution is add a file called .ruby-version, set the content to something like ruby-2.3.1.
If this not works, i suggest to reinstall ruby, bundler, and run bundle install for deploy user. We need to make sure that at the production directory, the ruby version is matched with the ruby version assigned in the deploy.rb.

Bring Rails gem locally

I am working on a Rails 4 application and one of the requirements is to have all of the Gems that normally go into the Gemfile brought in locally to the machine for use. This includes Rails and after looking at many google search results I am not able to find anyone talking about using the Rails gem locally on a Rails project.
My train of thought here is to clone the rails project from Github locally and then using the bundler config path to target that directory for rails, but I am not sure how well will that solution work or even if it will work.
I will appreciate any input here or if anyone has experience with this situation I will appreciate any insight.
The bundle install does that ?
If you want to install any gem to your project go to the project root on cmd
$ gem install gemname
Doing that you locally installed the gem afterwards you want to make sure its loaded to your project so you can run
$ bundle install
And simply like that your gem is installed. Hope that helps
If you have your project on github, then you can clone it using command.
git clone github-repository-url
And then from that project directory, run command
bundle install --path vendor
It will install all your rubygems into vendor directory.

rubymine - can't execute bundle install correctly

I am new to ruby on rails and rubymine, in rubymine I created a rails project, when try to run it, it seems can't execute bundle install automatically, I have to execute bundle install in shell by hand first, then could run the project from rubymine successfully.
My question is:
Which part did I miss, how to config the linux environment or config rubymine to let it execute bundle install automatically & correctly?

Explanation for "bundle install --deployment"

I'm trying to understand some of the details behind bundling for deployment that I can't wrap my head around. I've read a few posts on here such as this one:
What does Rails 3's Bundler "bundle install --deployment" exactly do?
and I feel I understand what it should do. On my computer, I ran bundle install initially and have been developing a project. However, I wanted to see if I could run it in deployment just to get a feel as to how a production server like Heroku sets up the application.
Therefore, I started by running bundle install --deployment, which correctly installs all my gems into the local vendor/bundle local directory. However, when I run bundle show [GEM], I'm still seeing the path to my system gem. I feel it should be showing a path to the local folder, but it's not.
Can someone clear up on what my misconception is?
Have a look at the description of the two on Bundler's site.
Running bundle install --deployment is to be run in the production environment, but will grab the gems from rubygems when run. Read more here under the 'Deploying Your Application' heading for the purpose of the --deployment flag.

install ruby on rails on windows

I need to run an application built in ruby on rails. I have installed ruby 1.9.2, rails 3.2.1, gem 1.8.15, Netbeans 6.8, glassfish v3, jdk6u30 and mysql but still, I can't get it run.
How do I install ruby on rails on WindowsXP?
I have to code on Windows at work and deploy to Linux and this is what I use
Ruby installer
Ruby Dev Kit
Install Rubygems
Open a Ruby command prompt for the next steps
gem install bundler
bundle install mysql
bundle install rails
Go to the directory you want to house your rails apps (e.g. cd \rails_source)
rails new (inserting the app name you want)
Once that is done, cd into the directory
Edit Gemfile to ask for gem 'mysql'
cd Config
edit Database.yaml to look for mysql db
cd ..
create a db for your mysql instance called _development
Go back to rails command line
bundle exec rails g scaffold (like blog_entry)
bundle exec rake db:migrate
bundle exec rake routes
Look for your desired route in the output
bundle exec rails s
Open a browser
Go to http://localhot:3000/
You should see a plain app
You can also check out Rails for Zombies which is a visual tutorial. It is not windows oriented but it helps fill in the gaps
I think its a quite simple to install ROR with mysql database on windows.
Follow the below instruction
Install Mysql Server 5.6 from [http://dev.mysql.com/downloads/mysql/] , use 32bit for XP and 64Bit for W7.
Go to mysql/bin folder under Program Files and copy and set the path in environment variable.Open command propmt and type mysql in order to check if mysql is installed correctly.
If still problem with Mysql, open run and type services.msc and check for MySQL service is started or not if not start manually.
Download ruby2.0.0, devkit 64-32 from http://rubyinstaller.org/downloads/
Download mysql connector from [http://dev.mysql.com/downloads/connector/c/] and make sure the version should be "(mysql-connector-c-noinstall-6.0.2-win32.zip)", you will find in "Looking for previous GA versions?".
Install ruby in C folder and select add path to executable while installing in first/second prompt.
Create folder devkit and extract devkit into it.
Extract mysql connector in C folder.
Open command Prompt and type ruby -v in order to check if ruby is installed, if not check ruby/bin path have to be added in environment variable.
Go to devkit folder, where you have extracted devkit, open command prompt and type ruby dk.rb init and then ruby dk.rb install.
Now we go through test, follow the instruction is given in test installation section in https://github.com/oneclick/rubyinstaller/wiki/Development-Kit and check with command starts with gem and ruby.
Create directory called dev and go inside it and type command gem install rails.
rails new app -d mysql2
Run command "bundle config build.mysql2 --no-ri --no-rdoc -- --with-mysql-dir=c:\mysql-connector[select what folder name is there for mysql connector]".
bundle install.
If still problem is exist, delete app folder and repeat command rails new app -d mysql2 again.
Go to app folder and use command rails server to start services. Check in browser with localhost:3000.
To create DB, use rake db:create in app folder.
Hope it helps.

Resources