search for: unshifting

Displaying 20 results from an estimated 113 matches for "unshifting".

Did you mean: shifting
2008 Feb 12
1
$:.unshift File.join(File.dirname(__FILE__),'..','lib')?
What this code lines mean? Especially $:. before the unshift? $:.unshift File.join(File.dirname(__FILE__),''..'',''lib'') Regards, Mohsin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Mar 03
1
starting webrick from ruby (tar2rubyscript.rb)
I am using tar2rubyscript to package up a rails application and run it as one file from the server. If you run script/server and have lighttpd install it will start lighty instead of webrick. So, thanks to Erik Veenstra''s suggestion, I add ARGV.unshift("webrick") to the init.rb file to force webrick to start: ARGV.unshift("webrick") load "script/server"
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3: - Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2: - Fixed the bug with precedence of if / @. - Add some imperative list operators inspired by Perl, and use those for constructing the Curl arguments, and more. Rich.
2009 Jun 22
0
Array unshift and save to database
Hello, I''ve noticed that I can''t save my object to the DB after using ''unshift'' on one of Array fileds. Ex: (below ''tags'' is a collection in object ''transaction'') transaction.tags.unshift(Tag.find_or_create_by_name(name)) transaction.save! Everything is fine when I am using ''<<'' to append tag to
2008 Jan 29
4
Setting up release-1.0.1
Hello, I am unable to get the backgroundrb server to run. Initially I got: /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant BackgrounDRb::MasterProxy (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:in
2014 Jan 13
3
[PATCH 1/3] ruby: Fix tests for out-of-tree build, simplify test scripts
--- configure.ac | 1 + ruby/run-ruby-tests | 27 --------------------------- ruby/run-ruby-tests.in | 27 +++++++++++++++++++++++++++ ruby/tests/tc_010_load.rb | 2 -- ruby/tests/tc_021_close.rb | 2 -- ruby/tests/tc_120_rlenvalue.rb | 4 +--- ruby/tests/tc_200_write.rb | 2 -- ruby/tests/tc_210_setvalue.rb | 2 -- run.in
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
The .new method was unintentionally broken in commit 9466060201600db47016133d80af22eb38091a49. This fixes the .new method and allows it to be called with multiple parameters, so you can use: Guestfs::Guestfs.new Guestfs::Guestfs.new() Guestfs::Guestfs.new(:close_on_exit => false) etc. For backwards compatibility, Guestfs::create may still be used. This commit also adds regression
2007 Apr 30
1
collection_select - prepending a "any" option
Say I have a normal <SELECT> tag being generated thusly: <%= collection_select :task, :id, Task.find(:all), :id, :name %> what is the easiest way to add a "ANY" option to the top of the option list? I know Task.find(:all) returns a collection object, so is there a unshift() for that? well OK I tried: Task.find(:all).unshift([:id=>0,
2016 Jul 08
2
Re: [PATCH v3 4/8] mllib: Add some imperative list manipulation functions.
On Thu, Jul 07, 2016 at 06:08:43PM +0100, Richard W.M. Jones wrote: > On Thu, Jul 07, 2016 at 07:00:46PM +0200, Pino Toscano wrote: > > On Thursday 07 July 2016 17:30:03 Richard W.M. Jones wrote: > > > This adds imperative list manipulation functions inspired by Perl. > > > The functions are passed list refs which get updated in place. > > > > > > This
2007 Nov 24
5
Service.start arguments failing or causing segfault
Hi, Unless I''m mistaken the final arguments to Service.start should be passed to the Daemon''s service_main method. Correct? I modified the Service.start method (now in CVS) to look something like this: def self.start(service, host=nil, *args) ... num_args = args.length if args.empty? args = nil else args.unshift(service) # Necessary?
2014 Jan 10
4
[PATCH] Add a minimal hive with "special" keys and values
--- images/README | 15 +++++++++++++++ images/mkzero/Makefile | 7 +++++++ images/mkzero/mkzero.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ images/special | Bin 0 -> 8192 bytes 4 files changed, 70 insertions(+) create mode 100644 images/mkzero/Makefile create mode 100644 images/mkzero/mkzero.c create mode 100644 images/special diff --git a/images/README
2016 Jul 07
0
[PATCH v3 4/8] mllib: Add some imperative list manipulation functions.
This adds imperative list manipulation functions inspired by Perl. The functions are passed list refs which get updated in place. This allows us to replace some awkward pure functional code like: let xs = ys in let xs = if foo then xs @ zs else xs in with: let xs = ref ys in if foo then append xs zs; --- mllib/common_utils.ml | 20 ++++++++++++++++++++ mllib/common_utils.mli | 36
2010 Apr 20
2
shift and pop equivalent in R
Dear All, I am wondering is there any shift (or pop or push or unshift) equivalent in R? For example, shift(x) # should return x[1], and x becomes x[-1] Thanks a lot. Best Regards, Xie Chao
2006 May 05
3
Plugin refresh time
Hi there, I''m currently developing a plugin to do authentication and authorisation. In the init.rb file of the plugin I have this code:- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), ''lib'')) require ''open_advantage/authorisation'' ActionController::Base.send :include, OpenAdvantage::Authorisation and this is the skeleton of my
2016 Jul 07
2
Re: [PATCH v3 4/8] mllib: Add some imperative list manipulation functions.
On Thursday 07 July 2016 17:30:03 Richard W.M. Jones wrote: > This adds imperative list manipulation functions inspired by Perl. > The functions are passed list refs which get updated in place. > > This allows us to replace some awkward pure functional code like: > > let xs = ys in > let xs = if foo then xs @ zs else xs in > > with: > > let xs = ref ys in
2005 Feb 08
2
test_process.rb => LoadError
Line 4 and following of test_process.rb reads: if defined?(RAILS_ROOT) # Temporary hack for getting functional tests in Rails running under 1.8.2 class Object #:nodoc: alias_method :require_without_load_path_reloading, :require def require(file_name) begin require_without_load_path_reloading(file_name) rescue Object => e
2006 Jan 23
3
date.to_s trimming
When I convert a datetime to a string, it prints out something like this Jan 20 12:00:00 EST 2006 I want to trim off the last twelve characters, i.e. :00 EST 2006 I tried to do it like so: @date = @meeting.date.to_s.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp but the chomps seem to do nothing. I''d love to use regex, but I don''t know which
2009 Mar 08
2
rspec 1.1.99.12, Rails 2.3.1, undefined method `rspec_options=''
Hi David, all: I recently upgraded to Rails 2.3.1RC2 (Ubuntu 8.10, ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]) and have been dilligently following the instructions for upgrading rspec and rspec-rails according to: http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems. and when I run ''rake gem'' fails with error: rake aborted! undefined method
2007 Sep 18
2
FW: Specifying spec and output format inline?
Anyone have any advice on this one? Thanks, Adam ________________________________ From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: Monday, September 17, 2007 2:14 PM To: rspec-users at rubyforge.org Subject: [rspec-users] Specifying spec and output format inline? Howdy from Austin, TX. I''m new to rspec, and am