My script requires other gem (amatch)to run. Is there a way to still package it using OCRA? I've tried many times, but it wont work.
Try to do so, for me this works:
ocra myscript.rb --output script.exe --gemfile Gemfile --add-all-core --gem-full
Related
I am running bundle install --local and getting the following error:
Your bundle is locked to rake (11.2.2), but that version could not be found in
any of the sources listed in your Gemfile. If you haven't changed sources, that
means the author of rake (11.2.2) has removed it. You'll need to update your
bundle to a different version of rake (11.2.2) that hasn't been removed in order to install.
Unable to decipher as to what needs to be done.
Any help would be highly appreciated.
Try running these commands
gem install rubygems-bundler
gem regenerate_binstubs
I encountered this problem also while using Jenkins, so here is what helped me:
First go through console to your job directory:
cd /var/lib/jenkins/workspace/<your-job-name>
If you are not sure where Jenkins stores your project, use pwd command inside your bash script.
In this directory, find your Gemfile.lock and delete it
rm Gemfile.lock
then try running bundle as you would usually do from console
bundle install
And see your bundle working. Hope it helps someone to solve the issue.
I've an issue with gem file development, for example I'm creating a gem with executable command.
It all works well, I can run command, BUT I've issue that if I'm trying to run command inside another project folder it's USING Gemfile from this second project.
Can I somehow disable it?
I want only to use Gemfile (and .gemspec) from my gem, and not with folder where it was executed.
I have a gem github.com/igorkasyanchuk/rails_db (version in master branch is not released yet, so you need to build it locally), gem build ..., then gem install ..., and then go to your project dir and run "railsdb". When you run it, it's trying to load gems from local folder Gemfile.
Thanks
Igor
If you are using the rubygems-bundler gem, executing commands provided by a gem will load the bundle of your current directory. You can prohibit this from happening for a particular gem providing commands in various ways. One way:
export NOEXEC_EXCLUDE=my_gem_command
See https://github.com/rvm/rubygems-bundler for more information about rubygems-bundler.
I am trying to build a RhoStudio application for the iPhone-simulator on Mac OS X 10.9.1.
The build with XCode fails at
/bin/sh -c ~/.rvm/gems/ruby-1.9.3-p545/gems/rhodes-4.0.1/platform/iphone/build/rhorunner.build/Release-iphonesimulator/rhorunner.build/Script-5C0442920EFBE79D0014E5C6.sh
[31mERROR: Gem rake is not installed, run `gem install rake` first. (B [m
Command /bin/sh failed with exit code 127
Within the script (Script-5C0442920EFBE79D0014E5C6.sh), there is a "source ~/.profile" call which seems to mess up the environment for rake. The error can be reproduced by opening a shell and executing the source command. If i don't source, there is no error for rake.
Also, if i try to gem install rake after the source command, there is a confirmation that it has been installed but the error still occurs.
Anybody help?
This is one of those issues where there are way too many specific factors involved to easily come up with a solution; I'm going through the ropes myself with Rhodes in 10.9. The problem is because Rhodes constantly is changing environments (it's a real mess) so your environment, which tracks the paths to your Ruby installations and Gems, will be very volatile. Here are some tips that might help you diagnose the issue:
Try running gem which rake, which shows you the absolute path of your rake gem as visible to the calling script. You can place this in one of your config files like ~/.profile or ~/.bashrc to test different contexts.
You can also use gem env to see a full printout of the gem's configuration for your environment, and just plain env shows you the system (shell) environment. Look very closely for the variables GEM_PATH AND GEM_ROOT which show you where Rubygems and your gem libs are searched for, respectively.
Keep in mind using sudo before install will affect where your gems are installed; this depends on where you installed Ruby, which ruby manager (for RVM look in ~/.rvm) and whether or not you are using Bundler for instance.
Hope that helps. Also, if you are into Bash scripting I recently posted a tip for managing the environment paths that might help: https://coderwall.com/p/f_dlyg
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
I have created a gem that provides an executable. Now I'd like the users of my gem to being able to use the executable independently from their setup especially regarding RVM and Bundler. Some users install the gem globally:
gem install foobar
Some users install it inside projects using Bundler:
echo "gem 'foobar'" > Gemfile && bundle
Some users have a Gemset per projects, others do not.
My Problem now is, that my gem creates a git hook that looks actually like that:
#!/bin/sh
bundle exec foobar -dostuff
That approach does not work for users, who did not install my gem using Bundler. If I changed that to:
#!/bin/sh
foobar -dostuff
some users have trouble, because the executable can not be found, or the "wrong" executable is executed.
Is there any way to clean up this "bundle exec" mess and provide a behavior of the executable that works for all users?
Regards
Felix
This script should help - https://github.com/gma/bundler-exec/blob/master/bundler-exec.sh
Read more on it here - http://effectif.com/ruby/automating-bundle-exec