rubymine - can't execute bundle install correctly - ruby-on-rails

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?

Related

Ruby on Rails ufinished

enter image description here
I have been trying execute the command --> rails new weblog in Terminal from Linux Mint after install Ruby however the application cannot be complete with the same error message, below:
Either bundle install or rake exec bundle install
What I can understand from the logs referenced in the question is that you are not executing bundle install command inside the project directory i.e. weblog. So first cd to weblog.
cd weblog
bundle install
I hope this helps!.

'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.

Redmine Icalendar export issue in mac

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

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.

Rails Server Won't Start

I'm trying to start my rails server with "rails server". I am getting the following error.
Could not find rake-0.9.2.2 in any of the sources
Run bundle install to install missing gems.
when I use gems, it say it is updated. Am I missing some type of path?
I am using MAC OSX Lion with the newest version of Ruby, Rake, Rails.
Run bundle install to make sure all the bundled gems are installed and available to the project.
Then try starting the server with bundle exec rails server - it's possible you've got the rake gem installed at the system level at a slightly different version level than what rails want. If you run rails via bundle exec, it'll set everything up for you

Resources