Closed GoogleCodeExporter closed 9 years ago
Ruby 1.8 has been deprecated, you should at least use 1.9.1.
Apparently Ubuntu's ruby is somewhat different from everyone else's:
$ irb
irb(main):001:0> File.methods
=> [:directory?, :exist?, :exists?, :readable?, :readable_real?,
:world_readable?, :writable?, :writable_real?, :world_writable?, :executable?,
:executable_real?, :file?, :zero?, :size?, :size, :owned?, :grpowned?, :pipe?,
:symlink?, :socket?, :blockdev?, :chardev?, :setuid?, :setgid?, :sticky?,
:identical?, :stat, :lstat, :ftype, :atime, :mtime, :ctime, :utime, :chmod,
:chown, :lchmod, :lchown, :link, :symlink, :readlink, :unlink, :delete,
:rename, :umask, :truncate, :expand_path, :absolute_path, :realpath,
:realdirpath, :basename, :dirname, :extname, :path, :split, :join, :fnmatch,
:fnmatch?, :new, :open, :sysopen, :for_fd, :popen, :foreach, :readlines, :read,
:binread, :write, :binwrite, :select, :pipe, :try_convert, :copy_stream,
:allocate, :superclass, :freeze, :===, :==, :<=>, :<, :<=, :>, :>=, :to_s,
:included_modules, :include?, :name, :ancestors, :instance_methods,
:public_instance_methods, :protected_instance_methods,
:private_instance_methods, :constants, :const_get, :const_set, :const_defined?,
:const_missing, :class_variables, :remove_class_variable, :class_variable_get,
:class_variable_set, :class_variable_defined?, :public_constant,
:private_constant, :module_exec, :class_exec, :module_eval, :class_eval,
:method_defined?, :public_method_defined?, :private_method_defined?,
:protected_method_defined?, :public_class_method, :private_class_method,
:autoload, :autoload?, :instance_method, :public_instance_method, :nil?, :=~,
:!~, :eql?, :hash, :class, :singleton_class, :clone, :dup, :initialize_dup,
:initialize_clone, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust,
:frozen?, :inspect, :methods, :singleton_methods, :protected_methods,
:private_methods, :public_methods, :instance_variables, :instance_variable_get,
:instance_variable_set, :instance_variable_defined?, :instance_of?, :kind_of?,
:is_a?, :tap, :send, :public_send, :respond_to?, :respond_to_missing?, :extend,
:display, :method, :public_method, :define_singleton_method, :object_id,
:to_enum, :enum_for, :equal?, :!, :!=, :instance_eval, :instance_exec,
:__send__, :__id__]
$ irb -v
irb 0.9.6(09/06/30)
$ ruby -v
ruby 2.0.0p299 (2013-08-29) [i686-linux]
Can you run "irb" and check the methods available for the File class?
Original comment by Steve8x8
on 2 Jun 2014 at 7:08
Adding a line "require 'pathname'" to each of the four affected source files
should fix the issue even for Ubuntu users. Can someone please confirm?
Original comment by Steve8x8
on 13 Jun 2014 at 3:19
Nobody?
Original comment by Steve8x8
on 25 Jun 2014 at 5:32
In a different app that suffered from this, I also had to swizzle things around
a bit:
-$path = File.dirname(File.realpath(__FILE__))
+$path = File.dirname(Pathname.new(__FILE__).realpath)
Original comment by daniel.r...@gmail.com
on 3 Jul 2014 at 6:02
Closing after 6 months of inactivity.
Original comment by Steve8x8
on 23 Jan 2015 at 10:20
Original issue reported on code.google.com by
ctietg...@gmail.com
on 29 May 2014 at 8:26