Rails服务器未运行。没有这样的文件或目录@dir_s_mkdir

时间:2017-01-29 19:29:55

标签: ruby-on-rails ruby rubygems bundle

我按照GoRails教程安装了rbenv。 在与宝石挣扎了一下后,遇到了这个问题:

Bundle complete! 49 Gemfile dependencies, 124 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Diegos-MacBook-Pro:used_products diiru$ which rails
/Users/diiru/.rbenv/shims/rails
 Diegos-MacBook-Pro:used_products diiru$
/Users/diiru/.rbenv/shims/rails server

1 个答案:

答案 0 :(得分:2)

也许您需要创建目录Approach 1 -> More effective --Create a table type of VARCHAR CREATE OR REPLACE type string_table IS TABLE OF VARCHAR2(100); --Function to return tabl type CREATE OR REPLACE FUNCTION string_manipulate RETURN string_table AS str_tab string_table; BEGIN SELECT 's00'||level bulk collect INTO str_tab FROM dual CONNECT BY level < 10; RETURN str_tab; end; --Use function in the query SELECT distinct 1 FROM (SELECT 's001' dn FROM dual UNION ALL SELECT 's002' dn FROM dual UNION ALL SELECT 's003' dn FROM dual UNION ALL SELECT 's004' dn FROM dual UNION ALL SELECT 's005' dn FROM dual UNION ALL SELECT 's006' dn FROM dual UNION ALL SELECT 's007' dn FROM dual UNION ALL SELECT 's008' dn FROM dual UNION ALL SELECT 's009' dn FROM dual )a WHERE a.dn IN (SELECT * FROM TABLE(string_manipulate) ); --Approach 2 --Function to get output as mentioned. CREATE OR REPLACE FUNCTION string_manipulate RETURN VARCHAR2 AS BEGIN RETURN 'S2009,S2020,S2021'; END; -- Use function value in a query SELECT 1 FROM dual WHERE '''S2009'',''S2020'',''S2021''' = ('''' ||REPLACE(string_manipulate,',',''',''') ||'''');