Search Results

Search found 42 results on 2 pages for 'ramon'.

Page 1/2 | 1 2  | Next Page >

  • Why won't vsftpd let me log in with a virtual user account?

    - by Ramon
    I would like to use vsftpd with virtual users and pam_pwdfile.so. I installed vsftpd and added two users (ramon and dragon) via htpasswd to my file /etc/vsftpd.passwd. The /etc/pam.d/vsftpd is configured to use this file. auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed auth required pam_pwdfile.so pwdfile /etc/vsftpd.passwd account required pam_permit.so @include common-account @include common-session The user "ramon" is also available in /etc/passwd. A login to the ftp with the user "ramon" works as expected. But a login using "dragon" does not :/ The result is always Login failed: 530 Login incorrect. Since it's possible that I made a mistake I tried the exact way documented in /usr/share/doc/vsftpd/examples/VIRTUAL_USERS/README. Still no luck. I can login with the user "ramon", but not with the user "dragon". Any ideas?

    Read the article

  • MacVim, Command-T: SEGV

    - by Ramon Tayag
    Details: OSX 10.7.4 I installed the latest MacVim via Homebrew: $ command-t brew install macvim ==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-64 Already downloaded: /Library/Caches/Homebrew/macvim-7.3-64.tgz ==> ./configure --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-t ==> make getenvy ==> make ==> Caveats MacVim.app installed to: /usr/local/Cellar/macvim/7.3-64 To link the application to a normal Mac OS X location: brew linkapps or: ln -s /usr/local/Cellar/macvim/7.3-64/MacVim.app /Applications ==> Summary /usr/local/Cellar/macvim/7.3-64: 1733 files, 27M, built in 53 seconds $ command-t brew linkapps Linking /usr/local/Cellar/macvim/7.3-64/MacVim.app Finished linking. Find the links under ~/Applications. $ command-t ruby -v ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] $ command-t rvm list rvm rubies ree-1.8.7-2012.02 [ i686 ] ruby-1.8.7-p358 [ i686 ] ruby-1.9.2-p290 [ x86_64 ] ruby-1.9.2-p320 [ x86_64 ] ruby-1.9.3-p194 [ x86_64 ] # Default ruby not set. Try 'rvm alias create default <ruby>'. # => - current # =* - current && default # * - default $ command-t cd ~/.vim/bundle/vim-command-t/ruby/command-t ruby extconf.rb $ command-t ruby extconf.rb checking for ruby.h... yes creating Makefile $ command-t make cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o ext.bundle ext.o match.o matcher.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc ld: warning: ignoring file ext.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: ignoring file match.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: ignoring file matcher.o, file was built for unsupported file format which is not the architecture being linked (i386) $ command-t mvim MacVim then opens here. But when I open Command-T, MacVim crashes and I see this in the command line: $ command-t dyld: lazy symbol binding failed: Symbol not found: _rb_intern2 Referenced from: /Users/ramon/.vim/bundle/vim-command-t/ruby/command-t/ext.bundle Expected in: flat namespace dyld: Symbol not found: _rb_intern2 Referenced from: /Users/ramon/.vim/bundle/vim-command-t/ruby/command-t/ext.bundle Expected in: flat namespace Vim: Caught deadly signal TRAP Vim: Finished. The problem I have is very similar to this, except that I switched to the system Ruby and still got the error.

    Read the article

  • Where may I get the EDX platform, the LMS open source project? [closed]

    - by Ramón Girona
    Possible Duplicate: Where can I download edx opensource learning platform? What other learning platforms are opensource? I have just found a query on the edx platform in which I am interested, being a significant piece of Learning Management System open source. I assume superuser platform cares about computer software, and therefore I don't see the question irrelevant. Besides I would like to know why a question is closed with a vague argument as "doesn't fit with the FAQ". Thanks very much, Ramón Girona

    Read the article

  • Laptop screen blank after login when external monitor is not connected

    - by Ramon Suarez
    Ubuntu does not switch back automatically to only monitor present when booting after disconnecting external monitor. Here's a video showing what happens. I get to the login window and everything looks ok, then I type my password, the desktop image shows up and... everything goes blank. It does not happen when I just login as a guest. When possible I work with my laptop connected to an external screen via the VGA port. The problem comes when I boot the computer without that secondary screen connected: The login screen comes out ok. After login the screen goes black, but I can hear the login sound. If I hit ctr + alt + backwards-delete and login again sometimes it is fixed, but not all. If I log in as a different user everything is OK. Then I log in as my user and sometimes it works. To have a screen I have to plug a monitor. Although I have turned on the laptop display with that monitor on, if I reboot it goes blank again after login, even if I turn off the external monitor before turning off the computer. I've managed to get my screen back with my username after going into recovery mode, but only sometimes. Failsafe would not load after second screen asking me what I wanted to do (no mouse to click nor keyboard working). My computer is a LDLC Aurore BB1-i5 -8 -S1. Which is the configuration file that keeps the information about the monitors using Displays under lightgdm and where is it? I guess if I could edit it I may have a chance :) One of the things I tried following a solution in another post was removing my monitors.xml file, but it does not work and I don't know how to create a good one that I could use now. When doing DISPLAY=:0 xrandrI get: Screen 0: minimum 320 x 200, current 320 x 200, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1366x768 60.0 + 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) This is the full dmesg after activating sudo xdiagnoseas Bryce sugested. (If you tell me the relevant parts I will paste them here) When conecting the external monitor, only the external will work, although I can see using Displays that the computer thinks that both are working. I've asked the question in Launchpad but have it keeps on expiring without any feedback. In my opinion Ubuntu should be able to detect automatically that there is no external monitor present and switch to the laptop monitor. There's a similar question here, but it does not apply to my case External monitor set as primary even when disconnected from laptop Update: For clarification, the problem happens only with my user and once I log in. I even get to see the screensaver for about a second, and then it goes blank. Tried Bryce's example (see his answer below), but it did not work. This is the info I get from tty1 with Display=:0 xrandr: – Ramon Suarez Jul 9 at 16:36 Screen 0: minimum 320 x 200, current 320 x 200, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1366x768 60.0 + 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis)

    Read the article

  • Crazy errors with FsLex and FsYacc

    - by Ramon Snir
    I am trying to compile this project: http://ramon.org.il/Here.zip But I get a bunch of non-sense errors. They got text I am familiar with, but in the position there is nothing like that (like unexpected ')' at an empty row). Help me, please!

    Read the article

  • Can't parse a 1904 date in ARPA format (email date)

    - by Ramon
    I'm processing an IMAP mailbox and running into trouble parsing the dates using the mxDateTime package. In particular, early dates like "Fri, 1 Jan 1904 00:43:25 -0400" is causing trouble: >>> import mx.DateTime >>> import mx.DateTime.ARPA >>> mx.DateTime.ARPA.ParseDateTimeUTC("Fri, 1 Jan 1904 00:43:25 -0400").gmtoffset() Traceback (most recent call last): File "<interactive input>", line 1, in <module> Error: cannot convert value to a time value >>> mx.DateTime.ARPA.ParseDateTimeUTC("Thu, 1 Jan 2009 00:43:25 -0400").gmtoffset() <mx.DateTime.DateTimeDelta object for '-08:00:00.00' at 1497b60> >>> Note that an almost identical date from 2009 works fine. I can't find any description of date limitations in mxDateTime itself. Any ideas why this might be? Thx, Ramon

    Read the article

  • Why don't RSpec's methods, "get", "post", "put", "delete" work in a controller spec in a gem (or out

    - by ramon.tayag
    I'm not new to Rails or Rspec, but I'm new to making gems. When I test my controllers, the REST methods "get", "post", "put", "delete" give me an undefined method error. Below you'll find code, but if you prefer to see it in a pastie, click here. Thanks! Here's my spec_helper: $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'rubygems' require 'active_support' unless defined? ActiveSupport # Need this so that mattr_accessor will work in Subscriber module require 'active_record/acts/subscribable' require 'active_record/acts/subscriber' require 'action_view' require 'action_controller' # Since we'll be testing subscriptions controller #require 'action_controller/test_process' require 'spec' require 'spec/autorun' # Need active_support to user mattr_accessor in Subscriber module, and to set the following inflection ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'dorkus', 'dorkuses' end require 'active_record' # Since we'll be testing a User model which will be available in the app # Tell active record to load the subscribable files ActiveRecord::Base.send(:include, ActiveRecord::Acts::Subscribable) ActiveRecord::Base.send(:include, ActiveRecord::Acts::Subscriber) require 'app/models/user' # The user model we expect in the application require 'app/models/person' require 'app/models/subscription' require 'app/models/dorkus' require 'app/controllers/subscriptions_controller' # The controller we're testing #... more but I think irrelevant My subscriptions_spec: require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe SubscriptionsController, "on GET index" do load_schema describe ", when only subscribable params are passed" do it "should list all the subscriptions of the subscribable object" end describe ", when only subscriber params are passed" do it "should list all the subscriptions of the subscriber" do u = User.create d1 = Dorkus.create d2 = Dorkus.create d1.subscribe! u d2.subscribe! u get :index, {:subscriber_type = "User", :subscriber_id = u.id} assigns[:subscriptions].should == u.subscriptions end end end My subscriptions controller: class SubscriptionsController The error: NoMethodError in 'SubscriptionsController on GET index , when only subscriber params are passed should list all the subscriptions of the subscriber' undefined method `get' for # /home/ramon/rails/acts_as_subscribable/spec/controllers/subscriptions_controller_spec.rb:21:

    Read the article

  • Ventajas y Beneficios de migrar a las últimas versiones de JD Edwards

    - by Ramon Riera
    La semana pasada realicé un webinar acerca de las Ventajas y Beneficios de migrar a las últimas versiones de JD Edwards EnterpriseOne. El objetivo no era contar en detalle todas las mejoras de las últimas versiones ya que son muchas y variables según la versión actual; si no resaltar algunos de los motivos generales por los que os valdría la pena migrar. En el video repaso la historia de JD Edwards y la estrategia y compromiso que Oracle tiene con el producto como se refleja en las políticas de Applications Unlimited, Lifetime Support y el roadmap del producto. También las principales mejoras que ha habido, especialmente centrándome en los 3 principales ejes de mejora que ha tenido y tiene JD Edwards: · El funcional con los nuevos módulos de Apparel Management, Fulfillment Managment y Environmental Accounting · Las mejoras que aporta la tecnología de Oracle, haciendo un especial énfasis en las mejoras en usabilidad de pantallas y uso del iPad · Las integraciones con el resto de aplicaciones de Oracle, como por ejemplo las aplicaciones analíticas de BI. Finalmente comento las facilidades que desde Oracle damos a los clientes para migrar y que se pueden resumir en la página web www.upgradejde.com dónde ponemos a disposición toda la información necesaria para planificar una migración como: Situación actual de mantenimiento de cada versión Productos y mejoras de cada versión Comparativas por versión tanto a nivel funcional como a nivel de cambios en la base de datos Consejos de migración para evaluar, planificar y ejecutar un proyecto de migración Toda la documentación de las versiones A continuación os djo el video:

    Read the article

  • Vertex Normals, Loading Mesh Data

    - by Ramon Johannessen
    My test FBX mesh is a cube. From what I surmise, it seems that the cube is on the extreme end of this issue, but I believe that the same issue would be able to occur in any mesh: Each vertex has 3 normals, each pointing a different direction. Of course loading in any type of mesh, potentially ones having thousands of vertices, I need to use indices and not duplicate shared verts. Currently, I'm just writing the normals to the vertex at the index that the FBX data tells me they go to, which has the effect of overwriting any previous normal data. But for lighting calculations I need more info, something that's equivalent to a normal per face, but I have no idea how this should be done. Do I average the 3 different verts' normals together or what?

    Read the article

  • I am not able to install wine

    - by Jose Ramon
    I can't install wine in Ubuntu 12.10. The report is: Los siguientes paquetes tienen dependencias incumplidas: (The following packages have unmet dependencies) wine1.4: PreDepends: dpkg (>= 1.15.7.2~) pero 1.16.7ubuntu6 no está instalado Depends: libc6 (>= 2.14) pero 2.15-0ubuntu20 no está instalado Depends: wine1.4-amd64 (= 1.4.1-0ubuntu1) pero 1.4.1-0ubuntu1 no está instalado Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) pero no va a ser instalado I would like that you help me in this problem. Thanks for everything.

    Read the article

  • How do I rebuild a corrupt dpkg status file?

    - by Ramón
    Whenever I type sudo apt-get remove and then press the Tab key for auto-completion I get the following message: grep-status: /var/lib/dpkg/status:15945: expected a colon. I don't see anything especially strange at line 15945 in the status file. It's a dot character in the description field of a mono library package and inserting a colon did not help. Removing the line containing the dot did not work either. Overwriting the file with status-old resulted in the same message. Is there some way to rebuild the status file?

    Read the article

  • How do I explain what's good about F#?

    - by Ramon Snir
    Many people ask me to explain to them why is F# (or other functional languages) better (or different) than other languages they know (like Java, C#, C++). Until today, I either tried showing few examples or using longs scary words or lending Tomas Petricek's book, but I find those ways either time consuming or unclear. Is there a simple(r) way to explain functional programming to imperative programmers?

    Read the article

  • Ubuntu 12.10 Screensaver/blanking problem

    - by Ramon J. Strauff
    I have upgraded to 12.10 and then downgraded again to 12.04 LTS because of the screensaver or screen blanking problem. After 10-12 minutes the screen goes black/blank when i dont do anything (idle). I have tried setting in the Brightness and Lock menu that the screen should never lock or turn off if idle. This is very annoying when watching movies etc... Would be nice if someone knows this.... Thanks...

    Read the article

  • Bypassing Router's DNS Settings

    - by Ramon Marco Navarro
    Is there a way to bypass my ISP provided CPE/router's DNS settings? I'd like to use OpenDNS but I am unable to access the administrator acount of the CPE. I tried logging in using the default passwords (admin/admin, admin/1234, etc) to no avail. I found out later that the admin password is generated using a generator where you input the CPE's MAC address. I tried emailing the manufacturer of the CPE (Huawei, the CPE is Huawei BM625) and my ISP but they aren't replying. I also saw similar queries (lots of them!) at Huawei's forums, without a single reply. So as a last resort, I'd like to know a way to bypass the CPE's DNS settings. My subscription is for a WiMAX service. I'm using Windows 7 and have already set the DNS settings for the Local Area Connection. But I still am not seeing the "You are already using OpenDNS" text at OpenDNS's site. And when explicitly using the OpenDNS servers I still seem to get 208.69.38.150 rather than the expected 208.69.38.160: nslookup www.opendns.com. 208.67.222.222 Server: resolver1.opendns.com Address: 208.67.222.222 Non-authoritative answer: Name: www.opendns.com Address: 208.69.38.150

    Read the article

  • Windows Clients: Windows or Linux Domain Controller?

    - by Ramon Marco Navarro
    I'm planning to set up a domain controller for our small computer laboratory. I'm a little confused as to what operating system to use for our domain controller. What's in the lab: The lab has 25 units running a mix of Windows 7 and Windows XP. The domain controller will only have 2GB of RAM running a C2D E7200. (Is this enough?) What we want: The Domain Controller will also be running a git server. The Domain Controller will also be used as a general development machine (mostly Java, PHP). A way to centralize the updates for the windows clients, so that they won't have to download the same patches from the remote site. The machines would just query them from the local domain controller and get the updates from there. Our head recommended that I virtualize a Windows Server 2008 system under a Linux host and use the former as a domain controller and the latter for development or the other way around. A comparison of the advantages and disadvantages of using a Linux distribution or Windows Server 2008 in this situation would also be appreciated. As you may have noticed by now, I'm kinda new to setting up a domain so I hope you guys will be able to help me. Thank you.

    Read the article

  • Convert to WAN port

    - by Ramon Marco Navarro
    I have a ADSL2+ Modem/Router. Is it possible to set one out of four of the LAN ports as a WAN port? If yes, how? The brand/model is: Prolink H9200P. I already contacted Prolink about this and the site said to wait for one business day. But I'm still asking here just in case someone could answer faster than Prolink. Thank you.

    Read the article

  • How to restore a VirtualBox image given the .vdi file

    - by Ramon Tayag
    Background I have VirtualBox on Linux and recently the drive with the system files failed on me. I'm able to use the Live CD to view the files of the storage drive, and through this, I can copy my data files to another computer while I work on this one. How do I load the .vdi in another computer (or in this case, the fresh install of Ubuntu)? I see many samples online of how to export it, but it assumes the host is currently working. Thanks!

    Read the article

  • Windows 2003 Cluster: Failover Delay

    - by Ramon Marco Navarro
    I am testing the failover policies of our test failover cluster system. When I shutdown the node who is currently controlling the cluster (NODE1), it takes about 2 mins and 40 seconds before the next node on the preferred list (NODE2) takes control of the cluster. I tried changing the looksAlive and isAlive interval to 5000ms to all resources, but that didn't help. Looking at the Event Viewer of the remaining nodes, it shows that it was almost instantly detected that NODE1 was down. But it took another ~2:40 minutes for it to be removed from the live cluster list and for NODE2 to take over. Is there anyway of changing or shortening this "failover delay"? This is the setup of the cluster: (1) One ClusterDC connected to the public network (3) Three nodes running Win2003 with a quorum type of MNS Private network is connected to network hub ________________ _________________ (ClusterDC)=------=| |=------=(Node1)=------=| | |Public Network|=------=(Node2)=------=|Private Network| | (Switch) |=------=(Node3)=------=| (Hub) | ---------------- -----------------

    Read the article

  • Confused about SPF Record setup

    - by Ramon A.
    Hello, I'm confused on how I should set up SPF records for my multiple domains. Here is my configuration: the setup is: (a) domain1.com points to server1 (b) mail.domain1.com points to server2 (c) domain2.com is a vhost in server1 (d) domain3.com is a vhost in server1 (e) and so on.. I want the SPF record to be set up so that domain1.com, domain2.com, domain3.com are authorized to send emails using mail.domain1.com. I'm confused on wether to put the SPF record on each domain, or on the main server only.

    Read the article

  • How to automatically define functions and aliases on remote server after ssh login

    - by Ramon
    I want to define bash functions and aliases in my remote shell automatically on login. I can't put the definitions into .profile or similar because the users I log in as are often shared with others who use the same systems and I don't have control of this. What I'm trying to do is execute a few bash function definitions in the remote process and then continue as a login shell. I tried this but it did not work: cat ~/.profile - | ssh -tt user@host bash -l Any ideas?

    Read the article

  • SSH equivalent of .profile/.bashrc

    - by Ramon
    I am looking for a way to automatically define some aliases inside my session on any server I ssh to. I can't put them in the .bashrc files on the server because the user accounts I log in with are shared by other people and besides there are dozens of them and maintaining a script on every machine would be painful. I know I could use expect to type the aliases automatically but I was just wondering if OpenSSH has anything built-in that could conceivably be used to achieve this?

    Read the article

  • WinHttpCertCfg not importing certificate

    - by Ramon Zarazua
    I need to setup a deployment script that imports an SSL certificate that my service uses. I have tried importing with WinHttpCertCfg and with CertMgr to no avail. Here are the command-line arguments I have tried to use with both: winhttpcertcfg.exe -i <certname>.pfx -c LOCAL_MACHINE\My -p <password> -a <user service runs as> and CertMgr.exe -add -all -s -r localMachine -c <cert name> My It seems from what I have investigated that CertMgr does not allow you to import certificates with a password, so I'd rather get winhttpcertcfg working. When I run them I get the following output: WinHttpCertCfg: Microsoft (R) WinHTTP Certificate Configuration Tool Copyright (C) Microsoft Corporation 2001. CertMgr: CertMgr Succeeded However, when I look into the local machine certificates in MMC, try to load them from my service, or list it out through winhttpcertcfg, or even looking at the registry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\MY\Certificates it is not found. I have tried all of the following: If I install the cert manually (Through CertMgr.msc dialogs) it works. The user installing is running as administrator The user installing has full access on the certificate The tools print out an error when something is wrong (wrong password) Tried it in multiple machines (All of them server 2008 R2) At this point I am officially out of ideas. Thank you.

    Read the article

  • Enhance GIMP’s Image Editing Power with Gimp Paint Studio

    - by Asian Angel
    Does your GIMP installation need a little super-charging? Using Gimp Paint Studio you can add a wonderful set of brushes, tools, and more to GIMP and take your work up to the next level. For our example we chose to install the beta version of Gimp Paint Studio on Ubuntu 10.10. Once you download the .zip file and unzip it, all that you need to do is manually transfer the contents shown here to the appropriate GIMP folders on your system. You can see the location of the destination folders here on our system… Note: Make certain to make a back-up copy of the “sessionrc and toolrc files” before you transfer Gimp Paint Studio into your installation (in case you would like to or need to revert back to the originals later). When you finish transferring the files start GIMP up and get ready to have fun. And if your experience is like ours then you should see a noticeable difference in window size and arrangement from the default settings. Here are some samples of the exceptional artwork done by Ramon Miranda and Mozart Couto using Gimp Paint Studio. Really impressive! Artwork by Ramon Miranda & Mozart Couto. Watch the introduction video and see Gimp Paint Studio in action. Download Gimp Paint Studio for Linux, Windows, and Mac [Gimp Paint Studio Homepage] *Keep in mind that there are stable and beta releases available, so choose the version that you are most comfortable with using. View the Installation Guides for Gimp Paint Studio *Page contains wonderful “video and written” versions for adding/installing Gimp Paint Studio to your system. Gimp Paint Studio Video Tutorials Library Visit the Gimp Paint Studio Gallery Latest Features How-To Geek ETC Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) Enhance GIMP’s Image Editing Power with Gimp Paint Studio Reclaim Vertical UI Space by Moving Your Tabs to the Side in Firefox Wind and Water: Puzzle Battles – An Awesome Game for Linux and Windows How Star Wars Changed the World [Infographic] Tabs Visual Manager Adds Thumbnailed Tab Switching to Chrome Daisies and Rye Swaying in the Summer Wind Wallpaper

    Read the article

  • Creating a multi-tenant application using PostgreSQL's schemas and Rails

    - by ramon.tayag
    Stuff I've already figured out I'm learning how to create a multi-tenant application in Rails that serves data from different schemas based on what domain or subdomain is used to view the application. I already have a few concerns answered: How can you get subdomain-fu to work with domains as well? Here's someone that asked the same question which leads you to this blog. What database, and how will it be structured? Here's an excellent talk by Guy Naor, and good question about PostgreSQL and schemas. I already know my schemas will all have the same structure. They will differ in the data they hold. So, how can you run migrations for all schemas? Here's an answer. Those three points cover a lot of the general stuff I need to know. However, in the next steps I seem to have many ways of implementing things. I'm hoping that there's a better, easier way. Finally, to my question When a new user signs up, I can easily create the schema. However, what would be the best and easiest way to load the structure that the rest of the schemas already have? Here are some questions/scenarios that might give you a better idea. Should I pass it on to a shell script that dumps the public schema into a temporary one, and imports it back to my main database (pretty much like what Guy Naor says in his video)? Here's a quick summary/script I got from the helpful #postgres on freenode. While this will probably work, I'm gonna have to do a lot of stuff outside of Rails, which makes me a bit uncomfortable.. which also brings me to the next question. Is there a way to do this straight from Ruby on Rails? Like create a PostgreSQL schema, then just load the Rails database schema (schema.rb - I know, it's confusing) into that PostgreSQL schema. Is there a gem/plugin that has these things already? Methods like "create_pg_schema_and_load_rails_schema(the_new_schema_name)". If there's none, I'll probably work at making one, but I'm doubtful about how well tested it'll be with all the moving parts (especially if I end up using a shell script to create and manage new PostgreSQL schemas). Thanks, and I hope that wasn't too long! UPDATE May 11, 2010 11:26 GMT+8 Since last night I've been able to get a method to work that creates a new schema and loads schema.rb into it. Not sure if what I'm doing is correct (seems to work fine, so far) but it's a step closer at least. If there's a better way please let me know. module SchemaUtils def self.add_schema_to_path(schema) conn = ActiveRecord::Base.connection conn.execute "SET search_path TO #{schema}, #{conn.schema_search_path}" end def self.reset_search_path conn = ActiveRecord::Base.connection conn.execute "SET search_path TO #{conn.schema_search_path}" end def self.create_and_migrate_schema(schema_name) conn = ActiveRecord::Base.connection schemas = conn.select_values("select * from pg_namespace where nspname != 'information_schema' AND nspname NOT LIKE 'pg%'") if schemas.include?(schema_name) tables = conn.tables Rails.logger.info "#{schema_name} exists already with these tables #{tables.inspect}" else Rails.logger.info "About to create #{schema_name}" conn.execute "create schema #{schema_name}" end # Save the old search path so we can set it back at the end of this method old_search_path = conn.schema_search_path # Tried to set the search path like in the methods above (from Guy Naor) # conn.execute "SET search_path TO #{schema_name}" # But the connection itself seems to remember the old search path. # If set this way, it works. conn.schema_search_path = schema_name # Directly from databases.rake. # In Rails 2.3.5 databases.rake can be found in railties/lib/tasks/databases.rake file = "#{Rails.root}/db/schema.rb" if File.exists?(file) Rails.logger.info "About to load the schema #{file}" load(file) else abort %{#{file} doesn't exist yet. It's possible that you just ran a migration!} end Rails.logger.info "About to set search path back to #{old_search_path}." conn.schema_search_path = old_search_path end end

    Read the article

1 2  | Next Page >